HTTP statuses and errors
HTTP statuses indicate if a request has been successful. The Datawrapper API responses will include standard HTTP statuses including error codes. You can find a good overview of HTTP status codes on https://httpstatuses.com.
To show you an example, the 418 client error is rather funny:
Any attempt to brew coffee with a teapot should result in the error code "418 I'm a teapot". The resulting entity body MAY be short and stout.
Since the Datawrapper API cannot make tea (or coffee) you won't see this error code from its endpoints.
Others like 201 CREATED are very likely though, for example when creating a chart. Here are some of the status codes the Datawrapper API uses:
Code | Name | Type | Example |
|---|---|---|---|
| OK | Success |
|
| Created |
| |
| No Content |
| |
| Moved permanently | Redirection | There is one permanent redirect where |
| Bad request | Client error | Some invalid data was sent to the server. Additional information may be provided as an error message. |
| Unauthorized | The API Access Token is invalid and authorization failed. You can check if the | |
| Forbidden | You don't have access to the requested resource. | |
| Not found | The requested resource was not found. | |
| Conflict | There is a conflict with the target resource. This can happen if you try to create a resource with a unique identifier that already exists. |
If you see any statuses in the 5xx (e.g., 500 Internal server error) range, this is probably a bug on our side. It could be that the server is unavailable. In this case, please contact us at support@datawrapper.de.