When an error occurs during a request, detailed information about the error is returned in the response body to aid in diagnosing the problem. Included in the response will be an errorId
that you can include if you reach out to Arcadia for help in troubleshooting the issue. You can see an example of an error response you might receive from the API below.
Error Response
{
"errors" : [ {
"details" : {
"errorId" : "err_U1S83L9FH99N0DLv1BmHy",
"value" : "mtr_1ee9ecf6-576f-dead-b4de-26575f35950"
},
"message" : "The field must match the pattern '^[a-z]{3}_[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$'",
"param" : "meterId",
"type" : "invalidParameter"
} ]
}
Below is a list of the possible values for type
in the Error schema, along with a brief description and tips for how to troubleshoot the issue.
Error Type | Description | Troubleshooting Tips |
---|---|---|
conflict | Returned when the resource cannot be modified in the requested way as it would conflict with another resource. | Usually this occurs when trying to name a resource with a name that is already in use, or when trying to delete a resource which is linked via other resources. |
internalServerError | Something is broken. This is usually a temporary error, for example in a high load situation or if an endpoint is temporarily having issues. | For this error, you should reach out to Arcadia with the errorId from the response to investigate. |
invalidParameter | The request was invalid or cannot be otherwise served. | The specific parameter that is being flagged as invalid will be listed in the param field |
notFound | The URL requested is invalid or the resource requested, such as an account or provider, does not exist. | Check that you are using valid parameters and the correct URL for the endpoint you're using. |
tooManyRequests | Returned when a request cannot be served due to the App's rate limit having been exhausted for the resource. | Check the number of requests per timeframe allowed with the endpoint you're using. Wait for the timeframe to reset. Space out your requests to ensure you don't hit rate limits. |
forbidden | The request is understood, but it has been refused or access is not allowed. | Check that your account has the necessary permission to perform the operation. |
methodNotAllowed | The HTTP method you're using is not appropriate for the endpoint you're accessing. For example, specifying PUT when it should be a POST. | Check that you are using the correct HTTP method for the endpoint you're trying to access. |
HTTP Status Codes and Messages
Client error responses are served with 400 series HTTP status codes and server error responses are served with 500 series HTTP status codes. Below you will find a list of all status codes you might encounter along with a brief description and tips for handling them.
Code | Text | Description | Troubleshooting tips |
---|---|---|---|
200 | OK | The request was successful! | |
304 | Not Modified | There was no new data to return. | |
400 | Bad Request | The request was invalid or cannot be otherwise served. An accompanying error message will explain further. | Double check the format of your JSON request body. |
401 | Unauthorized | There was a problem authenticating your request. This could be due to missing or incorrect authentication credentials. This may also be returned in other undefined circumstances. | Check that you are using the correct authentication method and that your credentials are correct. |
403 | Forbidden | The request is understood, but it has been refused or access is not allowed. An accompanying error message will explain why. | Check that your account has the necessary permission to perform the operation. |
404 | Not Found | The URL requested is invalid or the resource requested, such as an account or provider, does not exist. | Check that you are using valid parameters and the correct URL for the endpoint you're using. |
406 | Not Acceptable | Returned when an invalid format is specified in the request. Generally, this occurs where your client fails to properly include the headers to accept the response type. | Check that you are correctly passing expected query parameters, including expected headers, in your request. |
409 | Conflict | Returned when the resource cannot be modified in the requested way as it would conflict with another resource. | Usually this occurs when trying to name a resource with a name that is already in use, or when trying to delete a resource which is linked via other resources. |
410 | Gone | This resource is gone. Used to indicate that an API endpoint has been turned off. | |
422 | Unprocessable Entity | Returned when the data is unable to be processed. | Check that the data you are sending in your request is valid. For example, this data could be the JSON body of your request or an image. |
429 | Too Many Requests | Returned when a request cannot be served due to the App's rate limit having been exhausted for the resource. | Check the number of requests per timeframe allowed with the endpoint you're using. Wait for the timeframe to reset. Space out your requests to ensure you don't hit rate limits. |
500 | Internal Server Error | Something is broken. This is usually a temporary error, for example in a high load situation or if an endpoint is temporarily having issues. | Reach out to Arcadia support or simply wait and try again later. |
502 | Bad Gateway | Arcadia API is down, or being upgraded | Reach out to Arcadia support or simply wait and try again later. |
503 | Service Unavailable | The Arcadia servers are up, but overloaded with requests. Try again later. | Reach out to Arcadia support or simply wait and try again later. |
504 | Gateway Timeout | The Arcadia servers are up, but the request couldn't be serviced due to some failure within the internal stack. Try again later. | Reach out to Arcadia support or simply wait and try again later. |