When making API calls to Respan, you may encounter errors from two sources:
When Respan encounters an error, it will throw a RespanException. The error response will include details about what went wrong.
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).
When using OpenAI models, you may encounter OpenAIException. The error response will be in OpenAI’s format:
When using Anthropic models, you may encounter AnthropicException: