FieldViolation

interface FieldViolation

A message type used to describe a single bad request field.

Properties

Link copied to clipboard
abstract val description: String

A description of why the request element is bad.

Link copied to clipboard
abstract val field: String

A path that leads to a field in the request body. The value will be a sequence of dot-separated identifiers that identify a protocol buffer field.

Link copied to clipboard

Provides a localized error message for field-level errors that is safe to return to the API consumer.

Link copied to clipboard
Link copied to clipboard
abstract val reason: String

The reason of the field-level error. This is a constant value that identifies the proximate cause of the field-level error. It should uniquely identify the type of the FieldViolation within the scope of the google.rpc.ErrorInfo.domain. This should be at most 63 characters and match a regular expression of [A-Z][A-Z0-9_]+[A-Z0-9], which represents UPPER_SNAKE_CASE.

Functions

Link copied to clipboard
fun BadRequest.FieldViolation.copy(body: <Error class: unknown class>.() -> Unit = {}): BadRequest.FieldViolation

Copies the original message, including unknown fields.