Skip to main content
SDK integrations handle errors in two channels:
  • Returned API errors (response.isError === true)
  • Thrown exceptions (configuration/runtime issues)

Returned API errors

These methods return SendMessageResult, where API failures are represented as:
Methods:
  • IllaSDK.sendMessage
  • IllaSDK.sendToolResult
  • IllaSDK.sendToolResults
  • Chat.sendMessage

Common thrown errors

  • ChatNotFound
  • UserContextMissing
  • TelemetryStreamFailed
  • SSEParse
  • StreamingHttpError
  • StreamingResponseBodyNull
  • StreamingServerError
Additional thrown errors to account for in advanced flows:
  • CoreApiAuthenticationMissing (when constructing CoreApiProvider without x-api-key)
  • ChatAsyncToolCheckerUnavailable (calling Chat.awaitAction without checker)
  • SdkEmptyToolsResultsError (calling sendToolResults with empty array)

Practical handling pattern

Streaming handling pattern

For sendMessageStreaming, handle failures via onError callback and transport exceptions.