Skip to content

Error Codes

AAI uses structured error responses following JSON-RPC 2.0 conventions.

Error Response Format

json
{
  "status": "error",
  "error": {
    "code": "CODE_NAME",
    "message": "Human-readable description"
  }
}

Standard Codes

Protocol Errors (1xx)

CodeDescription
INVALID_REQUESTMalformed JSON or invalid structure
UNKNOWN_APPApp not found
UNKNOWN_TOOLTool not found in descriptor
INVALID_PARAMSParameters don't match schema

Authorization Errors (2xx)

CodeDescription
AUTH_REQUIREDAuthentication required
AUTH_DENIEDUser denied authorization
AUTH_EXPIREDToken expired, refresh failed
AUTH_INVALIDInvalid credentials or token

Execution Errors (3xx)

CodeDescription
TIMEOUTOperation timed out
NOT_FOUNDResource not found
RATE_LIMITEDToo many requests
SERVICE_UNAVAILABLEService temporarily unavailable

Internal Errors (5xx)

CodeDescription
INTERNAL_ERRORUnexpected server error
NOT_IMPLEMENTEDFeature not implemented

HTTP Status Mapping

For HTTP execution, standard HTTP status codes apply:

HTTPAAI Code
400INVALID_REQUEST
401AUTH_REQUIRED / AUTH_EXPIRED
403AUTH_DENIED
404UNKNOWN_APP / UNKNOWN_TOOL / NOT_FOUND
429RATE_LIMITED
500INTERNAL_ERROR
501NOT_IMPLEMENTED
503SERVICE_UNAVAILABLE

Back to Protocol

Released under the Apache 2.0 License.