Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Appendix A — Error codes and close codes

Jump table from symptom → code → what to do. Full field-level contracts stay in docs/api.md and docs/troubleshooting.md; this page is the cookbook index.

Before you dig into codes

CheckExpectChapter
GET /health200, model is "loading" or a head name01
GET /ready200 before first audio / job04, 02
version in /healthmatches the binary/image you deployed06

Gate liveness on /health, readiness on /ready — never on “TCP port is open”.

REST / SSE / jobs

HTTPCodeTypical causeFix
400empty_bodyEmpty POST bodySend audio bytes
400invalid_formatBad ?format=Use json / txt / srt / vtt / md02
400unsupported_codecBad ?codec=pcmu / pcma / g72203
400invalid_sample_rateMissing/out-of-range rate with raw codecPass sample_rate=8000 or 1600003
400conflicting_modeschannels=split and diarization=truePick one — 03
403loopback_onlyNon-loopback POST /v1/admin/reloadCall from 127.0.0.106
404(no body) / jobs_disabledJobs API off--enable-jobs02
404job_not_foundUnknown or TTL-evicted jobPersist results client-side — 02
409job_not_finishedResult polled too earlyWait for done or poll status
409job_not_cancellableCancel on terminal jobIgnore / treat as done
409reload_in_progressParallel admin reloadsWait and retry once — 06
409punctuation_not_availableForced punctuation=true without modelInstall punct model or use auto07
413payload_too_largeBody > --body-limit-bytesRaise limit or chunk via jobs — 02, 06
422invalid_audioCorrupt / unsupported containerCheck format table — 03
422transcription_errorDecode ok, inference failedCheck logs; try INT8 model present — 07
429rate_limitedPer-IP bucket emptyWait Retry-After; or raise limits / --trust-proxy06
429queue_fullJobs store fullDrain results / raise --jobs-max02
503timeoutPool saturatedBack off Retry-After; raise --pool-size07
503pool_closedShutdown in progressReconnect after deploy — 06
503initializingModel still loading (WS upgrade or ready)Poll /ready01
503reload_failed / reload_unsupportedHot-reload build failed / no builderFix model files; keep old engine — 06
504inference_timeoutOne run > --inference-timeout-secsRaise timeout for long files — 02

WebSocket error codes

CodeSessionMeaningFix
timeoutnever openedPool checkout timed outWait retry_after_ms, reconnect — 04
pool_closedendsServer drainingReconnect after upgrade — 06
idle_timeoutends (1001)No frames for --idle-timeout-secsKeep streaming PCM (silence is fine) — 04
max_session_duration_exceededends (1008)Hit --max-session-secsReconnect; final was flushed — 04
policy_violationends (1008)Empty-frame spamStop sending empty binaries
inference_timeoutendsChunk inference too longShorter audio / raise timeout
inference_errorcontinuesBad chunkFix client audio; session kept
inference_paniccontinues, state resetPanic isolatedTreat as new utterance; keep prior finals
configure_too_latecontinuesconfigure after first audioSend configure first — 04
invalid_sample_ratecontinuesRate not in supported_ratesUse a rate from ready
unsupported_protocol_versionendsClient protocol mismatchSpeak 1.004

WebSocket close codes

CodeWhenClient action
1001 Going AwaySIGTERM drain, idle, ping timeoutReconnect; expect a flushed final on shutdown
1008 Policy Violationmax session / empty spamAdjust caps or client behaviour
1009 Message Too BigFrame > --ws-frame-max-bytesSmaller PCM frames
1006 Abnormal ClosureNo close frame (kill, crash, middlebox)Check process health; not a protocol code the server sends