Skip to main content

Error Codes

When an error occurs while processing a call, the payload's body.errors[] carries one or more error objects. This page is the reference for the structure of the error object and the possible code values.

Upcoming changes

The error object structure and the error code scheme are scheduled to change to an easier-to-consume format. Details and timing will be announced on this page once finalized.

Error object structure

FieldTypeRequiredExampleHow to use it
codestringrequired"NETWORK_ERROR"Machine-readable error code. One of the values listed below. Use as a switch key on the receiver side.
messagestringrequired"Connection timed out"Human-readable error message (Japanese or English). Display / log purposes.
timestampstring (ISO8601)required"2026-05-12T10:23:45.000Z"Error occurrence time (UTC, millisecond precision). Use for time-ordered sorting.
wherestringrequired"OutboundCallAdapter.connect"Origin of the error (class / function / module name). Reference info for Recho-side investigation.
phasestringrequired"CONNECTING"Phase of the call at which the error occurred. Use for root-cause categorization and aggregation.
stacktracestringrequired"Error: Connection timed out\n at ..."Stack trace. May be empty (e.g. for errors originating outside the system). For first-pass investigation.
Important

Detect errors by checking that body.errors is non-empty. body.data.callStatus may contain transitional statuses such as CALLING even when an error occurred — it is not fixed to ERROR.

Possible code values

code is always one of the values in the table below. If an unexpected internal error occurs that is not in the list, it is delivered as UNKNOWN_ERROR. New codes may be added in future releases, so receivers must handle unknown codes gracefully (e.g. log via the default arm of a switch statement).

The Category column indicates the rough stage where the error occurred:

  • Call failed … the call itself could not be placed
  • In-call … failed during the live call (connection, AI processing, status transitions)
  • Post-call … failed after the call ended (analysis, log persistence, post-processing)
  • Internal monitoring … detected that the call status had not been updated for an extended period
  • Other … unexpected errors that do not fall into the categories above
codeCategoryDescription
INTERNATIONAL_PERMISSION_ERRORCall failedInternational dialing blocked — suspected fraudulent call / no international dialing permission.
TWILIO_API_ERRORCall failedAPI error on the telephony carrier (Twilio) side (non-permission, generic).
CALL_INITIATION_ERRORCall failedCall initiation failed (generic code regardless of connection method).
INVALID_REQUEST_IDCall failedInvalid request ID or phone number.
NETWORK_ERRORIn-callGeneric network I/O failure.
TIMEOUTIn-callExternal request or internal processing timed out.
WEBSOCKET_CONNECTION_FAILEDIn-callFailed to connect to the voice AI.
VOICEAI_PROCESSING_ERRORIn-callVoice AI processing error during the call.
PRE_VOICEAI_RUNNING_FAILEDIn-callPre-call preparation failed (config fetch, etc.).
STATUS_UPDATE_TO_CALLING_FAILEDIn-callTransition to CALLING failed.
STATUS_UPDATE_TO_CLOSING_FAILEDIn-callTransition to CLOSING failed.
STATUS_UPDATE_TO_CONCURRENCY_LIMIT_EXCEEDED_FAILEDIn-callTransition to CONCURRENCY_LIMIT_EXCEEDED failed.
POST_VOICEAI_RUNNING_FAILEDPost-callPost-call processing failed.
ANALYZER_FAILEDPost-callCall-result analysis failed.
GEMINI_ANALYZER_FAILEDPost-callAnalysis by the AI model (Gemini) failed.
HISTORY_FORMAT_FAILEDPost-callFailed to format the conversation history.
CALL_LOG_SAVE_FAILEDPost-callFailed to save the call log.
GEMINI_API_UNAVAILABLEPost-callThe AI model (Gemini) API is unavailable.
STATUS_UPDATE_TO_FINAL_STATUS_FAILEDPost-callTransition to a final status (COMPLETED, etc.) failed.
STATUS_UPDATE_IN_CALLBACK_FAILEDPost-callStatus-update failure inside post-disconnect processing.
CALLBACK_PROCESSING_FAILEDPost-callGeneral failure inside post-disconnect processing.
STALE_CALLING_DETECTEDInternal monitoringCall stuck in CALLING state past the allowed duration (outbound and inbound).
STALE_CLOSING_DETECTEDInternal monitoringCall stuck in CLOSING state past the allowed duration (outbound and inbound).
STALE_REQUESTED_DETECTEDInternal monitoringCall stuck in REQUESTED state past the allowed duration (outbound only).
STALE_CONNECTING_DETECTEDInternal monitoringCall stuck in CONNECTING state past the allowed duration (inbound only).
UNKNOWN_ERROROtherUnexpected error that does not fall into any of the codes above.
info

New codes may be added in future releases. Any addition will be announced by updating the list on this page.