Overview
Error Handling
When an API call fails, the API returns one of the following status codes:
401: Invalid API key429: Rate limit exceeded400: Other error404: Invalid request
Code
Error Codes
Tomba API uses the following error codes:
| Error Code | Meaning |
|---|---|
| 400 | Bad Request – Your request is invalid. |
| 401 | Unauthorized – Your API key is wrong. |
| 402 | The Email Verification failed due to an unexpected response from the remote SMTP server. This failure is outside our control; we advise you to retry later. |
| 403 | Forbidden – The resource requested is hidden for administrators only. |
| 404 | Not Found – The specified resource could not be found. |
| 405 | Method Not Allowed – You tried to access a resource with an invalid method. |
| 406 | Not Acceptable – You requested a format that isn’t JSON. |
| 410 | Gone – The resource requested has been removed from our servers. |
| 418 | I’m a teapot. |
| 429 | Too Many Requests – You're requesting too many resources! Slow down! |
| 500 | Internal Server Error – We encountered a problem with our server. Try again later. |
| 503 | Service Unavailable – We’re temporarily offline for maintenance. Please try again later. |
Example: Inspect Error Responses
Use -i to inspect both status code and headers:
Code
Handle API errors in JavaScript:
Code
Last modified on