- Keywords AI errors - Errors thrown by the Keywords AI platform itself
- Provider errors - Errors from the underlying LLM provider (e.g., OpenAI, Anthropic)
Keywords AI Exceptions
When Keywords AI encounters an error, it will throw aKeywordsAIException. The error response will include details about what went wrong.
Common Keywords AI 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), Keywords AI 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: