Skip to content

Error Responses

The REST API returns errors as a flat JSON object.

{
"statusCode": 401,
"code": "UNAUTHENTICATED",
"message": "Human-readable description",
"details": {}
}

details is optional and present only for some errors (e.g. validation, rate limiting).

StatusCodeDescription
400VALIDATION_ERRORMalformed request or invalid parameters
401UNAUTHENTICATEDInvalid or missing authentication
401CLI_SIG_INVALIDSigned-request signature failed verification
401CLI_IDENTITY_UNKNOWNThe public key is not registered
403FORBIDDENInsufficient permissions
404NOT_FOUNDResource not found
409CONFLICTResource already exists or state conflict
429RATE_LIMITEDToo many requests
500INTERNAL_ERRORUnexpected server error
503SERVICE_UNAVAILABLEAn upstream dependency is unavailable

Validation errors include field-level details:

{
"statusCode": 400,
"code": "VALIDATION_ERROR",
"message": "Validation failed",
"details": [
{ "field": "name", "message": "Required" },
{ "field": "exchange_account_id", "message": "Invalid id format" }
]
}
{
"statusCode": 429,
"code": "RATE_LIMITED",
"message": "Rate limit exceeded. Please slow down.",
"details": { "limit": 100, "remaining": 0, "resetMs": 42000 }
}

GraphQL responses use the standard errors array:

{
"data": null,
"errors": [
{
"message": "Not authorized",
"path": ["me"],
"errorType": "Unauthorized"
}
]
}

Many GraphQL operations also return a success/error envelope inside data:

{
"data": {
"create_strategy": {
"success": false,
"error": "Exchange account not found",
"data": null
}
}
}