Error handling
All errors produced by TransferGo Business API follow a predefined format:
{
"message": "human readable error description",
"code": "pre-defined code to help identify the error"
}
Here's a list of all the possible errors:
| Error code | HTTP status | Meaning |
|---|---|---|
| VALIDATION_ERROR | 400 | There are problems with the data you provided. E.g. the fromCreatedAt date is later than the toCreatedAt date. |
| INVALID_CORRELATION_ID | 400 | The provided Correlation ID doesn't match the required format. |
| INVALID_PAGE_SIZE | 400 | The provided pageSize is outside the supported range of 1 to 100. Omit it to use the default of 10. |
| INVALID_CURSOR | 400 | The cursor is invalid. Most likely it was modified after being received. |
| CURSOR_FILTERS_CHANGED | 400 | The cursor was used with different filters than the ones it was created with. Requests that carry a cursor must repeat the exact same filters as the request that produced it. To change filters, re-issue the request without a cursor to start a new result set. |
| HISTORY_WINDOW_EXCEEDED | 400 | The fromCreatedAt or toCreatedAt date is older than 90 days. You can only list transactions created in the last 90 days through the API. Use the TransferGo Business web app to export older transactions. |
Trying it out
If you haven't yet made a successful call to our API, please consult the Calling the API page first.
Execute the same ping call but this time with a dedicated query parameter:
curl -X GET \
--url https://business-api.transfergo.com/v1/ping?produceError=true \
--cert client.crt \
--key client.key \
--header "Authorization: Bearer {access_token}"
The expected response with status code 400:
{
"message": "This is an example error.",
"code": "EXAMPLE_ERROR"
}
Next steps
- Trace your requests for easier troubleshooting.