This profile describes a set of descriptors for generic error messages.
code
: An identifier that describes the type of error.title
: A short string used for labeling the error.message
: A description with details about the error.fields
: An object with validation errors
An object describing validation errors. The keys correspond to attributes of a resource. The values are an array of strings describing validation errors for the corresponding attribute.
{
"title": "Invalid entity",
"message": "The user could not be saved, due to unfulfilled requirements",
"code": "VALIDATION_ERROR",
"fields": {
"email": ["cannot be empty"]
}
}
or
{
"title": "Unpermitted action",
"message": "User is not allowed to edit this resource",
"code": "FORBIDDEN_ERROR",
}