Errors
Every error has the same shape, including unknown paths (404 not_found) and methods (405 method_not_allowed):
{ "error_code": "validation_failed", "message": "One or more fields are invalid.", "retryable": false, "request_id": "req_01a148543d6e77bc980f5967df8cc1bf", "details": [{ "field": "transaction.currency", "message": "must be NGN" }]}error_codeis stable and meant for your code.messageis for people.retryable: truemarks errors worth retrying, such asrate_limited(with aRetry-Afterheader) andinternal_error.- Validation failures are
422 validation_failed, withdetails: [{ field, message, code? }]. - Quote
request_idwhen you contact support.
Status codes
Section titled “Status codes”| Status | Meaning | Retry? |
|---|---|---|
400 |
The request could not be understood, or has unknown fields | No |
401 |
Invalid, expired or revoked API key | No |
403 |
Missing scope or role, or the monthly quota is used up | No |
404 |
Not found | No |
409 |
Conflict, such as policy_in_use or idempotency_key_reused |
No |
413 |
Too large, such as backtest_too_large |
No |
422 |
Validation failed. See details |
No |
429 |
Rate limited. Wait for Retry-After |
Yes |
500, 502, 503, 504 |
Server-side problem | Yes, with backoff |
In the Node SDK
Section titled “In the Node SDK”| Class | When |
|---|---|
AsqaryConfigError |
Bad client configuration (API key, identifier key, base URL) |
AsqaryInputError |
Invalid input caught before sending |
InvalidRequestError |
400 |
AuthenticationError |
401 |
PermissionError, QuotaExceededError |
403 |
NotFoundError |
404 |
ConflictError |
409 |
PayloadTooLargeError |
413 |
ValidationError |
422, with fieldErrors |
RateLimitError |
429, with retryAfter |
ServerError |
5xx |
ConnectionError, TimeoutError |
No response, or it took too long |