Error Handling
The Allawee API uses HTTP status codes and messages to let you know whether your API call was successful or failed. If your request fails, the API returns a status code, code, and message to let you know why the request failed. You can use these codes and messages to know what went wrong and how to work around it.
Status Codes
There are three ranges of status codes you can expect:
- 2**: This code shows that your request was successful and worked as expected.
- 4**: This code shows that there is something wrong with your request.
- 5**: This code shows that a problem occurred with the server while it was processing your request.
Some status codes you may see and what they mean are as follows.
Code | Title | Description |
---|---|---|
200 | Ok | Everything worked as expected. |
400 | Bad Request | The request was unacceptable, often due to missing a required parameter. |
401 | Unauthorised | No valid API key provided. |
402 | Request failed | The parameters were valid but the request failed. |
403 | Forbidden | The API key doesn’t have permission to perform the request. |
404 | Not found | The requested resource doesn’t exist. |
500, 503, 504 | Server errors | Something went wrong on Allawee’s end. These are rare. |
Error Messages
You can also use the message you get to know if your request was successful. If your request failed, it will tell you why your request failed. Any other message besides “Success” is an error message. Here are some common errors and possible solutions.
Message | Problem | Fix |
---|---|---|
Authorization Required | You did not include a header or your header does not have a user token. | Include an Authorization header with your user token. |
Invalid Authorization Key | Your authorization key is incorrect. | Make sure that you are using the correct user token. |
Invalid Authorization Type | You are not including your authorization key as a Bearer token. | Ensure that you precede your token with “Bearer ”. |
Malformed Authorization Key | Your user token is not in the proper format. | Make sure that you are using the correct user token. |
Application Timeout | Our server timed out. | Make your request again. |
Request Timeout | Your request timed out. | Make your request again. |
Service Unavailable | The server is unavailable. | |
Trial Ended | Your trial has ended. | Pay to use the service. |
Last updated Aug. 01, 2023
Next Up: Testing