Skip to content

Error Handling

Gateway should return standardized error responses.

Error Response Format

json
{
  "jsonrpc": "2.0",
  "id": 3,
  "error": {
    "code": -32001,
    "message": "Automation failed",
    "data": {
      "type": "EXECUTION_FAILED",
      "detail": "Script execution timed out after 30 seconds"
    }
  }
}

Error Code Definitions

Error CodeTypeDescription
-32001AUTOMATION_FAILEDAutomation script execution failed
-32002APP_NOT_FOUNDTarget application not installed or cannot be found
-32003TOOL_NOT_FOUNDRequested tool does not exist in aai.json
-32004PERMISSION_DENIEDInsufficient permissions, requires user authorization
-32005INVALID_PARAMSParameter validation failed
-32006AUTOMATION_NOT_SUPPORTEDPlatform does not support specified automation type
-32007AAI_JSON_INVALIDaai.json format error or does not match schema
-32008TIMEOUTOperation timed out
-32009APP_NOT_RUNNINGApplication not running and cannot be started
-32010SCRIPT_PARSE_ERRORScript parsing error
-32011AUTH_REQUIREDOAuth authorization required, user must authorize via browser
-32012AUTH_EXPIREDOAuth token expired and refresh failed
-32013API_REQUEST_FAILEDREST API request failed (HTTP 4xx/5xx)
-32014AUTH_CONFIG_INVALIDAuth configuration invalid (missing env_var, bad OAuth config)

Back to Spec Index

Released under the Apache 2.0 License.