- Respan errors - Errors thrown by the Respan platform itself
- Provider errors - Errors from the underlying LLM provider (e.g., OpenAI, Anthropic)
Respan Exceptions
When Respan encounters an error, it will throw aRespanException. The error response will include details about what went wrong.
Common Respan Error Responses
401 Unauthorized
400 Bad Request
422 Unprocessable Entity
429 Too Many Requests
500 Internal Server Error
Provider Exceptions
When an error originates from the underlying LLM provider (e.g., OpenAI, Anthropic), Respan will surface the provider’s error response directly. The exception type will match the provider’s exception (e.g.,OpenAIException for OpenAI errors).
OpenAI Errors
When using OpenAI models, you may encounterOpenAIException. The error response will be in OpenAI’s format:
Anthropic Errors
When using Anthropic models, you may encounterAnthropicException: