Skip to main content

Error reponses

The main means to detect a request error is its HTTP status code (in the range 4XX–5XX).

In addition, some enpoints provide additional information via the Problem Details for HTTP APIs standard, as defined in IETF RFC 7807. In such cases, the Internet media type will be application/problem+json.

The following is an example response (formatted for clarity) when trying to insert a record whose ID already exists in the database:

{
"title": "Unique Constraint Violation",
"status": 409,
"type": "tag:geodb.sintetic.iit.cnr.it,2024#integrity_constraint_violation",
"details": "Key (id)=(2db7255e-14be-4925-969b-ba46c78694e3) already exists."
}

Note that the status code (409 Conflict) is included in the response body as required by the standard, but client applications should mainly rely on the status code of the response itself.