Skip to main content

Error Handling

When using the PDFBOLT API, you may encounter various HTTP status codes indicating the outcomes of your requests. Understanding these codes can help you determine whether your request was successful or if there are issues that need to be addressed.

HTTP Status Codes

Below is a table of common HTTP status codes, their meanings, and recommended actions:

HTTP Status CodeerrorCodeMeaningRecommended Action
200nullThe request has succeeded, and the server has returned the requested data.
  • No action required.
  • You can proceed to use the returned data as intended.
400INVALID_REQUESTThe server could not understand the request due to invalid syntax.
  • Check the message in the response.
  • Fix the issue accordingly based on the provided message.
401UNAUTHORIZEDAuthentication is required and has failed or has not been provided.
  • Verify that the API key is correct.
  • Ensure that the API_KEY header is included in your request.
403FORBIDDENYou do not have permission to access the requested resource.
  • Your account does not have access to this functionality.
404NOT_FOUNDThe requested resource could not be found on the server.
  • Verify the endpoint URL for typos.
  • Refer to the API Endpoints for the correct URLs.
413PAYLOAD_TOO_LARGEThe request entity is larger than the server is willing or able to process.
  • The maximum request size is 10MB for verified accounts.
  • Reduce the size of your request payload accordingly.
429TOO_MANY_REQUESTSYou have exceeded the allowed number of requests in a given time frame.
  • You have exceeded the number of requests per minute or concurrent requests.
  • Refer to the Rate Limits section for more information.
500INTERNAL_SERVER_ERRORThe server encountered an unexpected condition that prevented it from fulfilling the request.
  • Retry the request later.
  • If the issue persists, contact us with details of the request.
503SERVICE_UNAVAILABLEThe server is currently unable to handle the request due to temporary overload or maintenance.
  • Wait a few moments and retry the request.
  • Check the service Status Page for any ongoing maintenance.
504GATEWAY_TIMEOUTThe server did not receive a timely response from an upstream server.

Error Response Format

In the event of an error, the API will return a JSON-formatted response containing details about the issue.

The structure of the error response is as follows:

{
"timestamp": "2024-11-19T23:59:59Z",
"httpErrorCode": 504,
"errorCode": "GATEWAY_TIMEOUT",
"errorMessage": "Timeout exceeded. Check parameters such as waitForFunction, waitForSelector, and timeout in your request."
}

Error Response Fields

Property NameTypeDescription
timestampstringThe date and time when the error occurred, in ISO 8601 format (UTC).
httpErrorCodenumberThe HTTP status code of the error.
errorCodestringRefer to errorCode values in the HTTP Status Codes table for all possible values.
errorMessagestringA descriptive message explaining the error.
tip
  • Use the information provided in the errorMessage field to understand what went wrong and how to correct it.
  • If you are unable to resolve the issue, consider reaching out to the support team with the error details for further assistance.