ErrorMessage
Error information returned in a change history response when a request fails.
Declaration
object ErrorMessageProperties
| Name | Type | Description |
|---|---|---|
code | string | A machine-readable error code identifying the failure type. Possible values: |
message | string | A human-readable description of the error. Read-only. |
details | [ErrorMessage.Details] | An array of additional error detail objects providing field-level context. Each object in the array contains |
Discussion
When a change history request fails, the API populates the error field of BaseAuditResponse with an ErrorMessage. On success, error is null.
The ErrorMessage object is specific to Change History endpoints and isn’t the same object as the general Error envelope used elsewhere in the API. Its code is a closed 3-value enum rather than an open string, so Error‘s codes (such as INVALID_ARGUMENT) don’t apply here.
Check the HTTP status code first to determine the error category. Use code for programmatic error handling. Use message and details for diagnostic logging or user-facing error displays.
Common error scenarios:
Missing required
eventTimefilter returns400 Bad RequestExpired or missing credentials return
401 UnauthorizedRequesting a
detailIdthat doesn’t exist returns404 Not Found
A 429 Too Many Requests or 500 Internal Server Error response also populates error. For 429, see Applying Rate Limits for the headers and backoff strategy to use before retrying. For 500, retry with backoff since the failure may be transient.
Example
{
"code": "BAD_REQUEST",
"message": "The eventTime filter is required.",
"details": [
{
"code": "MISSING_FIELD",
"message": "eventTime must be provided.",
"info": {
"field": "eventTime"
}
}
]
}