The Octogen API uses standard HTTP status codes for errors. The Python and TypeScript SDKs translate every non-2xx response into a typed exception, so you can catch specific error conditions without inspecting raw HTTP status codes. Understanding which errors are transient and which require a code or configuration change helps you build integrations that fail fast on bugs and recover gracefully from network issues.Documentation Index
Fetch the complete documentation index at: https://www.octogen.ai/docs/llms.txt
Use this file to discover all available pages before exploring further.
Error categories
Octogen API errors fall into two categories:- HTTP errors (4xx/5xx) — The server returned a non-2xx response. The SDK raises a typed exception with a
status_code,detail, and the rawresponseattached. - Network errors — The request never reached the server (DNS failure, timeout, connection reset). The SDK raises
OctogenConnectionError.
If you are using the Catalog Partner MCP server instead of the REST API, tool-level errors are returned as HTTP 200 responses with an
error field in the payload rather than as HTTP error codes. This guide covers the REST API only.HTTP error reference
401 — Authentication error
401 — Authentication error
SDK exception:
OctogenAuthenticationErrorThe API key is missing, malformed, or has been revoked. Common causes:OCTO_API_KEYenvironment variable is not set- The key string was truncated or contains extra whitespace
- The key was deactivated in the partner portal
403 — Forbidden
403 — Forbidden
SDK exception:
OctogenForbiddenErrorThe API key is valid, but your organization is not allowed to perform this operation. Common causes:- Your organization does not have a Catalog Partner grant
- The API key belongs to the wrong organization
- The key’s org type does not have permission for the endpoint
404 — Not found
404 — Not found
SDK exception:
OctogenNotFoundErrorThe requested catalog or product is not visible to your API key. Common detail values:"catalog_not_found"— The catalog key you passed incatalogis not granted to your organization. UseGET /v1/catalogsto see available keys."product_not_found"— No active product in your granted catalogs matches the URL you passed to/products/lookup.
GET /v1/catalogs. For product lookup, confirm the URL is a canonical product page URL and that the catalog covering that domain is granted to your organization.422 — Validation error
422 — Validation error
SDK exception: Each entry has:
OctogenValidationErrorThe request body failed schema validation. The response body contains a detail array where each entry identifies the invalid field:loc— path to the invalid field (e.g.["body", "limit"])msg— human-readable error messagetype— machine-readable error type
SDK exception hierarchy
All SDK exceptions inherit fromOctogenError. The full hierarchy:
OctogenAPIError and its subclasses expose:
.status_code(Python) /.statusCode(TypeScript) — the HTTP status code.detail— the parsed error body from thedetailfield, or the raw response text.response— the underlying HTTP response object
Handling errors in code
Retry guidance
| Error type | Retry? | Action |
|---|---|---|
OctogenAuthenticationError (401) | No | Replace the API key |
OctogenForbiddenError (403) | No | Check org catalog grants |
OctogenNotFoundError (404) | No | Verify catalog key or product URL |
OctogenValidationError (422) | No | Fix the request body |
OctogenConnectionError | Yes | Retry with exponential backoff |
OctogenAPIError with 5xx | Yes | Retry with exponential backoff |
5xx responses, use an exponential backoff strategy with jitter. Start with a 1-second delay, double on each retry, and cap at 30 seconds. After three to five failed attempts, surface the error to the caller rather than retrying indefinitely.