Troubleshooting
Error Codes
Understand Swift API error codes and how to resolve them
If you have questions or issues related to an API service in the Pilot or Live environments, please contact the Swift Customer Support Center.
Swift uses industry-best practices to handle errors. You can expect three outcomes when interacting with our APIs:
2XX - Success
The request was processed successfully.
4XX - Client Error
An error due to information provided by the client application.
5XX - Server Error
An error with the API provider.
Swift API error codes
Here are the errors you may encounter when calling the Swift APIs.
Errors are categorized as either Fatal or Transient. Transient errors may resolve on retry.
| Status Code | Reason Phrase | Severity | SwAP Code | Recommendations |
|---|---|---|---|---|
| 400 | Bad Request | Fatal | SwAP5xx | Make sure the API request conforms to the OpenAPI specification. |
| 400 | Unavailable | Fatal | SwAP522 | Make sure the x-bic provided is valid. |
| 401 | Unauthorized | Fatal | SwAP50X | Make sure the access token provided is valid, and the API resource exists. |
| 403 | Forbidden | Fatal | SwAP503 | Make sure the correct access token is used for the API call. |
| 404 | Not Found | Fatal | SwAP506 | Make sure the resource URL is correctly defined as in the OpenAPI specification. |
| 429 | Too Many Requests | Transient | SwAP507 | Refer to Rate Limit and try again. |
| 503 | Service Unavailable | Transient | SwAP590 | The API response arrived late. Try again, if the error persists, contact Swift Customer Support. |
| 503 | Temporarily Unavailable | Transient | SwAP599 | Try again. If the error persists, contact Swift Customer Support. |
| 504 | Gateway Timeout | Transient | SwAP591 | The API provider cannot be reached. Contact Swift Customer Support. |