Writer uses conventional HTTP response codes to indicate the success or failure of an API request. In general:
- Codes in the 2xx range indicate success.
- Codes in the 4xx range indicate an error that failed given the information provided (e.g., a required parameter was omitted, etc).
- Codes in the 5xx range indicate an error with Writer's servers.
- Some 4xx errors that could be handled programmatically include an error code that briefly explains the error reported.
- Our native timeout response occurs after 5 minutes. If a timeout occurs with a 500 error status code along with details in the response. When you encounter a timeout, it is either because there was too much data in the original call or there was a network issue.
Here are some common error codes that can occur:
|400 Bad Request||The request is invalid or cannot be served. This may occur when the request contains incorrect or invalid parameters or data.|
|401 Unauthorized||The request requires user authentication. This may occur when the API requires a valid API key or user token to access the requested data.|
|403 Forbidden||The server understands the request, but it refuses to authorize it. This may occur when the API requires certain permissions to access the requested data, and the request does not have the necessary permissions.|
|404 Not Found||The requested resource could not be found. This may occur when the API does not have the requested data or when the requested URL is incorrect.|
|429 Too Many Requests||The user has sent too many requests in a given amount of time. This may occur when an API has rate limiting in place to prevent excessive usage.|
|500 Internal Server Error||An unexpected condition was encountered by the server. This may occur when the API has a bug or is experiencing a server-side error.|
|503 Service Unavailable||The server is currently unable to handle the request. This may occur when the API is undergoing maintenance or is temporarily unavailable.|
These are just a few of the many error codes that can occur when making API requests. Understanding the meaning of these codes can help you diagnose and resolve issues when working with APIs.
Updated 3 months ago