Skip to content

Error Handling & Status Codes

This page lists all possible error responses from the Petameta Chat API.

Standard Error Format

All errors follow this structure:

json
{
  "success": false,
  "error": "Invalid API Key",
  "code": "AUTH_INVALID_KEY",
  "request_id": "req_17635951",
  "timestamp": "2025-11-19T23:32:38.70Z"
}

Error Codes

This page lists all possible error codes returned by the PetaAI Chatbot API.

Authentication Errors

CodeMessage
AUTH_MISSING_KEYAPI key missing in header
AUTH_INVALID_KEYInvalid or expired API key
AUTH_INSUFFICIENT_SCOPEAPI key does not have required permissions

Request Errors

CodeMessage
BAD_REQUESTMalformed JSON request
MISSING_FIELDSRequired fields missing
INVALID_FIELDOne or more fields have invalid values
CodeMessage
HANDOVER_REQUIREDUser needs human assistance
HANDOVER_NOT_SUPPORTEDHandover system not configured

Rate Limiting

CodeMessage
RATE_LIMIT_EXCEEDEDToo many requests

Server Errors

CodeMessage
SERVER_ERRORUnexpected internal error
MODEL_TIMEOUTAI model did not respond in time