Error responses
Response Style Properties
| Field | Description | Properties |
|---|---|---|
| operation_id | A descriptive enough string that is linked to the operation/feature. | A required snake case string |
| code_id | A descriptive enough string that is linked to the reason for the error. | A required snake case string |
| message | An actual user friendly error message. | A required string |
| metadata | Contains endpoint specific additional information. | An optional JSON object |
| errors | A data-set that is relevant to the error. | An optional JSON object |
Client Error Responses
The description and the listed status codes below indicate that the action requested by the client was not successfully processed due to apparent client errors in the request.
The client errors will have status codes in the 400-499 range and have relevant response content where required.
Generic Client Error Responses
| Error Code | Cause | Response Body |
|---|---|---|
| 401 | Token Expired | {"operation_id":"unknown","code_id":"token_expired","message":"The provided token is expired or is not valid."} |
| 401 | Token Invalid | {"operation_id":"unknown","code_id":"token_invalid","message":"An invalid token was provided."} |
| 401 | Customer Not Found | {"operation_id":"unknown","code_id":"customer_not_found","message":"The customer in the request was not found."} |
| 401 | Unauthorized Scope | {"code_id":"unauthorized_scope","message":"The provided token does not have the required permissions for this endpoint.","operation_id":"unknown"} |
| 401 | Unauthorized | {"operation_id": "unknown","code_id":"unknown","message": "Unauthorised request","errors": {}} |
| 404 | Not Found | {"operation_id": "unknown","code_id":"unknown","message": "Route or resource not found","errors": {}} |
| 405 | Method Not Allowed | {"operation_id": "unknown","code_id":"unknown","message": "Method not allowed","errors": {}} |
List of Code Ids
| Name | Description |
|---|---|
| failed_validation | Occurs when a request validation process fails. |
| invalid_login | Occurs when insufficient login credentials were provided. |
| resource_not_found | Occurs when a requested record or a feature was not found. |
| unique_constraint | Occurs when a request tries to create an existing record in database. |
| task_not_found | The specified task could not be found. |
| account_not_found | The specified account could not be found. Please check the account identifier is correct. The account might be closed or suspended. |
| internal_error | An unexpected internal error. |
| internal_timeout | A task had timed out. |
| internal_transient_error | An unexpected transient internal error. |
| request_validation | Occurs when a request validation process fails. |
| auth_denied | Authorisation process cancelled. |
| auth_expired | The authorisation url has expired. Please generate a new one to continue. |
| connection_not_found | No active connection with the provider |
| connection_expired | The connection consent has expired. re-authentication required |
| connection_revoked | The connection consent has been revoked. Re-authentication required |
| connection_status | The connection consent is in the wrong status to perform the action. |
| connection_permission | The connection consent does not have the required permissions for this resource |
| provider_not_found | Unknown provider |
| provider_failure | The provider has had an unexpected failure |
| provider_timeout | The provider has taken too long to respond. |
| provider_maintenance | The provider is temporarily unavailable due to maintenance |
| provider_request_limit | The provider rate limit has been exceeded |
| provider_endpoint_unimplemented | The provider has not implemented this endpoint |
| provider_endpoint_deprecated | The provider has deprecated this endpoint |
| provider_reauthenticate | The provider has deemed this consent needs to be reauthenticated. |
| token_expired | The provided oauth bearer token is expired, or was invalidated. A new one should be requested. |
| token_invalid | The provided oauth bearer token is not valid. A new one should be requested. |
| customer_not_found | The provided customer ID could not be found. |
| unauthorized_scope | The provided oauth bearer token does not have sufficient scopes to access the requested endpoint. Please contact Bud Support. |
Examples
400 Bad Request
Returned after a failed attempt to create a new resource by passing invalid data to POST /resources.
After trying to create a new resources by passing invalid data to POST /resources.
{
"operation_id": "resources_post",
"code_id": "failed_validation",
"message": "Invalid request payload.",
"metadata": {},
"errors": {
"name": "This value is required.",
"email": "This value is invalid."
}
}Server Error Responses
The server errors will have status codes in the 500-599 range. The server errors will look very much like the "Client Errors" but will contain bare minimum information attached to them.
Generic Server Error Responses
| Error Code | Cause | Response Body |
|---|---|---|
500 | Internal Server Error | {"message": "An error occurred while processing your request"} |
503 | Service Unavailable | {"message": "Service unavailable"} |
In the case that you receive a 5XX response please retry your request and if the problem persists please raise a support request.
If you have any questions, please contact us via the chatbot (bottom-right of screen 👉) or via a support request or check our FAQs.
Updated 18 days ago
