Skip to content

Database

Already exists

A value that must be unique within the institute is already taken - a subject code, an admission number, a section name within its class. Choose a different value.

HTTP 409UNIQUE_VIOLATION

In the response

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

errors
The field holding the taken value, when it can be told. Each entry is a { field, message }, with field a dotted path into the request body.

Example response

HTTP 409 · application/problem+json
{
  "type": "https://smartpathshaala.com/problems/unique-violation",
  "title": "Already exists",
  "status": 409,
  "detail": "<what went wrong this time>",
  "instance": "<the request path>",
  "code": "UNIQUE_VIOLATION",
  "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.