If a request fails the server SHOULD answer with an error which is stored in the "error" property. The simplest form ist just a string with the type of the error:
{
"error": "csrfTokenInvalid"
}
Error types SHOULD be in camelCase starting with a lowercase letter and SHOULD NOT end with "Error".
The more elaborate form is providing an error object. Error objects MUST hold a "type" property with the type of the error: