get https://api.pandadoc.com/erroneous_request
The Erroneous Request
page provides detailed information about the types of errors that can occur when making requests to the API, the possible causes of these errors, and how to handle them effectively.
Common Error Codes
400 Bad Request
: The server could not understand the request due to invalid syntax.401 Unauthorized
: The client must authenticate itself to get the requested response.403 Forbidden
: The client does not have access rights to the content.404 Not Found
: The server can not find the requested resource.500 Internal Server Error
: The server has encountered a situation it doesn't know how to handle.
Error Messages
If an error occurs during an API request, PandaDoc will return a 400 HTTP status with an error in this response format.
Each error response includes a message that provides more details about the error. For example:
Invalid parameter: 'id' must be a positive integer.
Missing required field: 'email'.
Causes
Common causes of erroneous requests include:
- Invalid or missing parameters.
- Incorrect authentication credentials.
- Requesting a resource that does not exist.
- Server-side issues.
Troubleshooting Tips
- Check Request Syntax: Ensure that your request is correctly formatted and includes all required parameters.
- Verify Authentication: Make sure your authentication credentials are correct and have not expired.
- Resource Availability: Confirm that the resource you are trying to access exists and is available.
- Server Status: If you encounter a server error, check the server status or logs for more information.
Example Error Response
{
"type": "request_error",
"details": {
"non_field_errors": ["Either template_id or form_id should be added to query."]
}
}