🚩 Learn how to handle some common errors you may encounter.
We use conventional HTTP status codes in the response. In general, the status codes in the range 2xx indicate success, those in the range 4xx indicate failure and codes in the range 5xx indicate a server error. Check the table below for more details:
|200 - ✅ Success||The request was successful.|
|400 - ❌ Bad Request||The request was invalid or malformed.|
|401 - ❌ Unauthorized||Authentication is required, and the request lacks valid credentials.|
|403 - ❌ Forbidden||The request is understood, but it has been refused or access is not allowed.|
|404 - ❌ Not Found||The requested resource was not found.|
|422 - ❌ Unprocessable Entity||The API has failed to process the request.|
|429 - ❌ Too Many Requests||You have reached the rate limit of the API.|
|500 - ❌ Internal Server Error||It's not you; it's us. There was an error on our server, and we could not fulfill the request.|
|503 - ❌ Service Unavailable||The service you are trying to access is currently unavailable.|
Encountering an error when using Blockdaemon APIs can be frustrating, but here are some recommendations for handling errors to help you troubleshoot:
400 - Bad Request
💣 Cause: There was an issue with your request. The error may be due to the information you provided or the structure of the request.
🛠 Solution: Review the information you entered and ensure that it conforms to the expected format. If you are unsure about the format, check our API Reference or contact us for further assistance.
401 - Unauthorized
💣 Cause: This error occurs when you do not have valid credentials to access the requested resource.
🛠 Solution: Provide valid credentials, such as an API key or access token, with your request.
403 - Forbidden
💣 Cause: This error occurs when you do not have permission to access the requested resource.
🛠 Solution: Check if you have the necessary permissions to access the resource. If you believe you should have access but are still unable to access it, contact us for assistance.
404 - Not Found
💣 Cause: It means that the requested resource could not be found.
🛠 Solution: Check that the resource exists and that you are using the correct URL to access it. If you are unsure about the correct URL, check our API Reference.
405 - Method Not Allowed
💣 Cause: The server received a request method that is not supported for the targeted resource. This error typically occurs when you try to use an HTTP method that is not allowed for the specific endpoint or resource you are accessing.
🛠 Solution: Make sure you are using the correct HTTP method. Review our API documentation for information on the supported methods for the specific resource. Double-check that your request is properly formatted and includes all the necessary parameters. If the issue persists, reach out to us for further assistance.
422 - Unprocessable Entity
💣 Cause: It means that the request was well-formed, but it could not be processed due to semantic errors.
🛠 Solution: Review the requested data and ensure that it is semantically correct. If you are unsure about the semantics of the request data, check our API Reference again.
429 - Too Many Requests
💣 Cause: It indicates that you have exceeded the rate limit set by us. This can happen if you make too many requests within a given time period or send requests too frequently.
🛠 Solution: View our rate limit guide and try again after a few seconds. It is better to reduce the frequency of the requests.
500 - Internal Server Error
💣 Cause: This error indicates that there was an error on the server, and the API could not fulfill the request.
🛠 Solution: You can retry later, or please get in touch with our support if you keep getting this error.
503 - Service Unavailable
💣 Cause: This status code indicates that the server is currently unable to handle the request due to temporary overload or maintenance.
🛠 Solution: You should wait and retry later. If the issue persists, contact us to report the issue and request assistance.