ErrorModel#

pydantic model safir.models.ErrorModel#

A structured API error message.

Parameters:

data (Any) –

Show JSON schema
{
   "title": "ErrorModel",
   "description": "A structured API error message.",
   "type": "object",
   "properties": {
      "detail": {
         "title": "Detail",
         "type": "array",
         "items": {
            "$ref": "#/definitions/ErrorDetail"
         }
      }
   },
   "required": [
      "detail"
   ],
   "definitions": {
      "ErrorDetail": {
         "title": "ErrorDetail",
         "description": "The detail of the error message.",
         "type": "object",
         "properties": {
            "loc": {
               "title": "Location",
               "example": [
                  "area",
                  "field"
               ],
               "type": "array",
               "items": {
                  "type": "string"
               }
            },
            "msg": {
               "title": "Message",
               "example": "Some error messge",
               "type": "string"
            },
            "type": {
               "title": "Error type",
               "example": "some_code",
               "type": "string"
            }
         },
         "required": [
            "msg",
            "type"
         ]
      }
   }
}

Fields:
field detail: list[ErrorDetail] [Required]#