<!--
{
  "availability" : [
    "Apple Ads Platform API: 1.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "Apple-Ads-Platform-API",
  "identifier" : "/documentation/Apple-Ads-Platform-API/ErrorMessage",
  "metadataVersion" : "0.1.0",
  "role" : "Object",
  "symbol" : {
    "kind" : "Object",
    "modules" : [
      "Apple Ads Platform API"
    ],
    "preciseIdentifier" : "data:apple-ads-platform-api:ErrorMessage"
  },
  "title" : "ErrorMessage"
}
-->

# ErrorMessage

Error information returned in a change history response when a request fails.

```
object ErrorMessage
```

## Discussion

When a change history request fails, the API populates the `error` field of [`BaseAuditResponse`](/documentation/Apple-Ads-Platform-API/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`](/documentation/Apple-Ads-Platform-API/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 `eventTime` filter returns `400 Bad Request`
- Expired or missing credentials return `401 Unauthorized`
- Requesting a `detailId` that doesn’t exist returns `404 Not Found`

A `429 Too Many Requests` or `500 Internal Server Error` response also populates `error`. For `429`, see [Applying Rate Limits](/documentation/Apple-Ads-Platform-API/rate-limits) for the headers and backoff strategy to use before retrying. For `500`, retry with backoff since the failure may be transient.

### Example

```json
{
  "code": "BAD_REQUEST",
  "message": "The eventTime filter is required.",
  "details": [
    {
      "code": "MISSING_FIELD",
      "message": "eventTime must be provided.",
      "info": {
        "field": "eventTime"
      }
    }
  ]
}
```

## Topics

### Dictionaries

[`object ErrorMessage.Details`](/documentation/Apple-Ads-Platform-API/ErrorMessage/Details-data.dictionary)

A single error detail entry describing one part of a failed change history request.

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)