Interface ErrorResponseValidation

Shared fields between all error response variants.

Hierarchy

Properties

Properties

message: string

A brief explanation of the error.

null: {
    info: string;
    value_name: string;
}

Type declaration

  • info: string

    Extra information about what went wrong.

  • value_name: string

    The name of the value that failed validation.

status: number

The HTTP status of the error.

type: "VALIDATION"

The error when a request a client sends is incorrect and fails validation.


Example

{
"type": "VALIDATION",
"status": 422,
"message": "Invalid request",
"value_name": "author",
"info": "author name is a bit too cringe"
}