Contents

Error

The standard error envelope that the API returns when a request fails.

Declaration

object Error

Properties

NameTypeDescription
code Requiredstring

The reason the API rejected the request (such as INVALID_ARGUMENT or UNAUTHORIZED).

messagestring

A human-readable error summary of what went wrong at the request level.

details[ErrorDetail]

An array of zero or more error details objects that describe specific field-level or request-level violations. See ErrorDetail.

Discussion

The Error object is the standard error envelope that the API returns when a request fails.

Change History endpoints use a separate, ChangeHistory-specific error object, ErrorMessage, whose code is a closed enum (BAD_REQUEST, NOT_FOUND, NOT_AUTHED) rather than the open string used here.

Check details when you need to pinpoint exactly which part of the request was invalid, for example, a specific field value that violated a constraint or a missing required parameter.

Example

{
  "code": "INVALID_ARGUMENT",
  "message": "The request could not be processed because one or more fields failed validation.",
  "details": [
    {
      "code": "FIELD_REQUIRED",
      "message": "campaign.name is required and was not provided for AwayFinder campaign creation."
    }
  ]
}

See Also

Error Responses