Error Handling

๐Ÿšฉ Learn how to handle some common errors you may encounter.

Response Codes

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:

Status CodeDescription
200 - โœ… SuccessThe request was successful.
400 - โŒ Bad RequestThe request was invalid or malformed.
401 - โŒ UnauthorizedAuthentication is required, and the request lacks valid credentials.
403 - โŒ ForbiddenThe request is understood, but it has been refused or access is not allowed.
404 - โŒ Not FoundThe requested resource was not found.
422 - โŒ Unprocessable EntityThe API has failed to process the request.
429 - โŒ Too Many RequestsYou have reached the rate limit of the API.
500 - โŒ Internal Server ErrorIt's not you; it's us. There was an error on our server, and we could not fulfill the request.
503 - โŒ Service UnavailableThe service you are trying to access is currently unavailable.

Error Troubleshoots

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.