Website

Error handling

Last update: 29.01.2024

Error handling

This API uses standard HTTP status codes to indicate the status of a response.

Name Code Description
Bad request 400 The request was unacceptable. For example validation didn’t pass.
Unauthorized 401 The request has not been applied because it lacks valid authentication credentials for the target resource.
Forbidden 403 The server understood the request but is refusing to fulfill it
Not Found 404 The server has not found anything matching the request URI
Not acceptable 406 The server is unable to return a response in the format that was requested by the client
Unsupported Media Type 415 The server is refusing to service the request because the entity of the request is in a format not supported by the requested resource for the requested method
Too many requests 429 Too many requests hit the API too quickly
Server error 500 An error that is not caused by client, something bad happened on the server

Example

{
  "error": {
    "status": 400,
    "title": "Invalid request",
    "detail": "Data validation error occurred",
    "validation": [
    {
      "field": "title",
      "title": "Musisz podać tytuł",
      "detail": "Musisz podać tytuł"
    },
    {
      "field": "description",
      "title": "Musisz podać opis",
      "detail": "Musisz podać opis"
    }
    ]
  }
}
					
		
Copied to clipboard