ErrorDetail

  • The JSON representation details errors encountered during validation or internal processes, providing specific information about the error.

  • Error details include a status code, field path, error message, problematic value, and potentially the index within a repeated field.

  • The field attribute uses dot-separated identifiers to pinpoint the location of the error within the request body.

  • While the message offers a description of the failure, it's intended for internal use and might not be user-friendly.

Details an error that resulted in a validation or internal failure.

JSON representation
{
  "code": integer,
  "field": string,
  "message": string,
  "value": string,
  "fieldIndex": integer
}
Fields
code

integer

The status code, which should be an enum value of ErrorCode.

field

string

A path leading to a field in the request body. The value is a sequence of dot-separated identifiers that identify a protocol buffer field. For example, "errorDetails.field" would identify this field.

message

string

A description of why the field caused a failure. The message is in English and may not be suitable for display to users.

value

string

The value that failed the request.

fieldIndex

integer

If the request field that generated this error is repeated, this will contain the zero based index of the entry in that field which caused validation to fail.