Skip to Content

Error Codes

All errors follow the RFC 7807 Problem Details format.

Error Response Format

{ "type": "https://api.gotamil.in/problems/{error-code}", "title": "Human-readable title", "status": 400, "detail": "Detailed explanation", "request_id": "fastify-request-id", "errors": [{ "field": "text", "message": "Required" }] }

The errors array is present only for validation errors.

Error Code Reference

CodeStatusDescription
unauthorized401Missing or invalid Bearer token
forbidden403Insufficient role or permissions
not-found404Resource not found
validation-error400Request schema validation failed
idempotency-in-progress409Duplicate idempotency key being processed
operation-claim-failed503Failed to claim operation for processing
async-enqueue-failed503Failed to enqueue async task
provider-error502Provider API request failed
provider-unavailable503All configured models failed
provider-request-rejected502Provider rejected request (non-retryable)
provider-config-missing500Tenant provider config not found
server-misconfiguration500Missing required configuration
internal-error500Unexpected server error

Common Scenarios

401 Unauthorized

Your bearer token is missing, expired, or malformed. Ensure your OIDC token is fresh and includes the required tenant_id claim.

403 Forbidden

Your token is valid but lacks the required role. Check the authorization matrix.

409 Idempotency In Progress

You sent a request with the same Idempotency-Key that is currently being processed by another request. Wait and retry, or use a new idempotency key.

502 Provider Error

The upstream Gemini API returned an error. The API retries automatically with model fallback chains. If you see this consistently, validate your BYOK credentials.

503 Provider Unavailable

All models in the fallback chain have been exhausted. This typically indicates a widespread provider outage or invalid credentials.

Last updated on