<!--
{
  "availability" : [
    "iOS: 14.3.0 -",
    "iPadOS: 14.3.0 -",
    "macCatalyst: 14.3.0 -",
    "macOS: 11.1.0 -",
    "visionOS: 1.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "AdServices",
  "identifier" : "/documentation/AdServices/AAAttributionError/Code",
  "metadataVersion" : "0.1.0",
  "role" : "Enumeration",
  "symbol" : {
    "kind" : "Enumeration",
    "modules" : [
      "AdServices"
    ],
    "preciseIdentifier" : "c:@E@AAAttributionErrorCode"
  },
  "title" : "AAAttributionError.Code"
}
-->

# AAAttributionError.Code

The error code that the parent class issues.

```
enum Code
```

## Topics

### Creating an error code

[`init?(rawValue: Int)`](/documentation/AdServices/AAAttributionError/Code/init(rawValue:))

Creates an error code structure with the specified raw value.

### Determining the cause of an error

[`case internalError`](/documentation/AdServices/AAAttributionError/Code/internalError)

The server is unable to provide a token because of an internal error.

[`case networkError`](/documentation/AdServices/AAAttributionError/Code/networkError)

The server is unable to provide a token because the internet isn’t available.

[`case platformNotSupported`](/documentation/AdServices/AAAttributionError/Code/platformNotSupported)

The server is unable to provide a token because of an unsupported operating system.

### Getting information about error codes

  <doc://com.apple.documentation/documentation/Swift/Error/localizedDescription>

### Comparing errors

  <doc://com.apple.documentation/documentation/Swift/!=(_:_:)-18co7>

## Relationships

### Conforms To

[`Sendable`](/documentation/Swift/Sendable)

[`SendableMetatype`](/documentation/Swift/SendableMetatype)

[`Hashable`](/documentation/Swift/Hashable)

[`BitwiseCopyable`](/documentation/Swift/BitwiseCopyable)

[`RawRepresentable`](/documentation/Swift/RawRepresentable)

[`Equatable`](/documentation/Swift/Equatable)

---

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)