Skip to content

General

Bad request

The request was refused because something in it is wrong. detail says what; when it is about particular fields, errors names them.

HTTP 400BAD_REQUEST

In the response

Besides the standard members type, title, status, detail, instance, plus code and requestId:

errors
The fields at fault, when the refusal is about specific ones. Each entry is a { field, message }, with field a dotted path into the request body.

Example response

HTTP 400 · application/problem+json
{
  "type": "https://smartpathshaala.com/problems/bad-request",
  "title": "Bad request",
  "status": 400,
  "detail": "<what went wrong this time>",
  "instance": "<the request path>",
  "code": "BAD_REQUEST",
  "requestId": "<also sent as X-Request-Id>",
  "errors": [
    {
      "field": "<path.in.request>",
      "message": "<what is wrong with it>"
    }
  ]
}

Values in angle brackets vary per request. Quote the requestId when reporting an error; it is how the server’s log line is found.