Tell a caller why the voice service did not start the call - #654
Merged
davidmckayv merged 2 commits intoSep 28, 2026
Merged
Conversation
The voice call route replaced every provider error with one generic sentence, including the fixed VoiceError messages written for the caller, such as the service being busy. It now passes those on, as the dictation route does, and keeps the generic line for anything else. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
kevin9327
requested review from
MikeRyanDev,
davidmckayv,
guidovizoso,
mxmzb and
tylerslaton
as code owners
September 28, 2026 10:02
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
davidmckayv
previously approved these changes
Sep 28, 2026
Move the unchanged changelog entry to its own existing anchor.
davidmckayv
approved these changes
Sep 28, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What this changes
server/src/voice/provider.tsdefinesVoiceErrorfor "only fixed, safe messages", and the providers throw it with text written for the caller: "The voice service is busy. Please retry shortly." when the service answers 429, "The voice service returned an invalid response.", "The voice service requires an audio SDP offer." The/api/voice/callsroute caught every error the same way and answered "The voice service could not start a call. Please retry.", so none of those messages ever reached anyone. A person who hit the provider's rate limit was told to retry at once, which is the one thing that does not help.The route now answers with the
VoiceError's own message, still as a 502, the wayserver/src/dictation/routes.tsalready passes aTranscriptionError's message on. Any other error, which may carry an upstream body, still gets the generic sentence, and a cancelled or timed-out handshake still gets its 504. The existing "provider errors do not leak secrets" test is unchanged and passes.Where it runs
OpenBot is deployed as several server processes behind a load balancer, serving a whole company.
Consecutive requests from the same person reach different processes, and the process that answered a
WebSocket upgrade is rarely the one that answers the next call on that conversation.
State that outlives a single request therefore has to be shared, or the change works on one machine
and stops working the moment there are two, without saying so. That failure is worse than not
shipping the feature: it passes review, passes CI, passes a local demo, and only surfaces as a Bot
that forgets, a question nobody can answer, or a boundary that never fires.
Answer these even when the answer is "none":
Boundary and audit
Changelog
CHANGELOG.mdunderUnreleased.Proof
New test in
server/tests/voice-routes.test.ts: a provider that throws the busyVoiceError. On unmodifiedmain:After the fix:
bun test tests/voice-routes.test.tsinserver→ 10 pass, 0 fail.tsc --noEmitinserverexits 0. Biome check clean on the changed files.🤖 Generated with Claude Code