Skip to Content
DocumentationError Codes

Error Codes

Every error emitted by the GuideKit SDK carries a structured error code, a human-readable message, and an actionable suggestion. All errors extend GuideKitError.

Handling Errors

import { isGuideKitError } from '@guidekit/core'; try { await core.sendText('Hello'); } catch (err) { if (isGuideKitError(err)) { console.log(err.code); // e.g. 'AUTH_EXPIRED_TOKEN' console.log(err.suggestion); // Actionable fix console.log(err.recoverable); // Can the SDK continue? } }

Error Code Reference

Authentication

CodeRecoverableDescription
AUTH_INVALID_KEYNoThe API key or token is invalid
AUTH_EXPIRED_TOKENNoThe session token has expired
AUTH_TOKEN_REFRESH_FAILEDNoFailed to refresh the session token
AUTH_ENDPOINT_FAILEDNoThe token endpoint returned an error

Configuration

CodeRecoverableDescription
CONFIG_INVALID_PROVIDERNoAn unsupported LLM provider was specified
CONFIG_MISSING_REQUIREDNoA required configuration option is missing

Initialization

CodeRecoverableDescription
INIT_SHADOW_DOM_FAILEDNoFailed to create the Shadow DOM container
INIT_BROWSER_UNSUPPORTEDNoThe browser does not meet minimum requirements

Rate Limiting

CodeRecoverableDescription
RATE_LIMIT_PROVIDERYesThe LLM provider rate limit was hit
RATE_LIMIT_CLIENTYesClient-side rate limit exceeded

Resource Exhaustion

CodeRecoverableDescription
RESOURCE_EXHAUSTED_LLMNoLLM usage quota exhausted
RESOURCE_EXHAUSTED_STTNoSTT usage quota exhausted
RESOURCE_EXHAUSTED_TTSNoTTS usage quota exhausted

Permissions

CodeRecoverableDescription
PERMISSION_MIC_DENIEDNoMicrophone permission was denied by the user
PERMISSION_MIC_UNAVAILABLENoNo microphone device is available

Network

CodeRecoverableDescription
NETWORK_WEBSOCKET_FAILEDYesWebSocket connection failed
NETWORK_CONNECTION_LOSTYesNetwork connection was lost
NETWORK_TIMEOUTYesA network request timed out

Timeouts

CodeRecoverableDescription
TIMEOUT_STT_CONNECTYesSTT WebSocket connection timed out
TIMEOUT_LLM_RESPONSEYesLLM response timed out
TIMEOUT_TTS_CONNECTYesTTS WebSocket connection timed out
TIMEOUT_TTS_FIRST_AUDIOYesTTS first audio chunk timed out

Browser Support

CodeRecoverableDescription
BROWSER_NO_WEB_AUDIONoWeb Audio API is not available
BROWSER_NO_WASMNoWebAssembly is not supported
VAD_PACKAGE_MISSINGNo@guidekit/vad is not installed

Content

CodeRecoverableDescription
CONTENT_FILTER_TRIGGEREDNoLLM safety or content filter was triggered

Privacy

CodeRecoverableDescription
PRIVACY_HOOK_CANCELLEDNoThe onBeforeLLMCall hook cancelled the request

Error Classes

ClassCodesDefault Recoverable
AuthenticationErrorAUTH_*No
ConfigurationErrorCONFIG_*No
InitializationErrorINIT_*No
RateLimitErrorRATE_LIMIT_*Yes
ResourceExhaustedErrorRESOURCE_EXHAUSTED_*No
PermissionErrorPERMISSION_*No
NetworkErrorNETWORK_*Yes
TimeoutErrorTIMEOUT_*Yes
BrowserSupportErrorBROWSER_*, VAD_*No
ContentFilterErrorCONTENT_*No
Last updated on