fix: log error on auto-end failure instead of swallowing

Address review feedback: log a warning when endCall fails on stream
disconnect instead of silently discarding the error.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
JayMishra-github
2026-02-16 10:42:45 -08:00
committed by Peter Steinberger
parent 4c0a741308
commit 95024d1671

View File

@@ -188,7 +188,9 @@ export class VoiceCallWebhookServer {
console.log(
`[voice-call] Auto-ending call ${disconnectedCall.callId} on stream disconnect`,
);
void this.manager.endCall(disconnectedCall.callId).catch(() => {});
void this.manager.endCall(disconnectedCall.callId).catch((err) => {
console.warn(`[voice-call] Failed to auto-end call ${disconnectedCall.callId}:`, err);
});
}
if (this.provider.name === "twilio") {
(this.provider as TwilioProvider).unregisterCallStream(callId);