<!--
{
  "availability" : [
    "iOS: 11.0.0 -",
    "iPadOS: 11.0.0 -",
    "macCatalyst: 13.1.0 -",
    "macOS: 10.15.0 -",
    "tvOS: 11.0.0 -",
    "visionOS: 1.0.0 -",
    "watchOS: 9.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "DeviceCheck",
  "identifier" : "/documentation/DeviceCheck/DCError-swift.struct/Code/serverUnavailable",
  "metadataVersion" : "0.1.0",
  "role" : "Case",
  "symbol" : {
    "kind" : "Case",
    "modules" : [
      "DeviceCheck"
    ],
    "preciseIdentifier" : "c:@E@DCError@DCErrorServerUnavailable"
  },
  "title" : "DCError.Code.serverUnavailable"
}
-->

# DCError.Code.serverUnavailable

An error that indicates a failed attempt to contact the App Attest service
during an attestation.

```
case serverUnavailable
```

## Discussion

You receive this error when you call
[`attestKey(_:clientDataHash:completionHandler:)`](/documentation/DeviceCheck/DCAppAttestService/attestKey(_:clientDataHash:completionHandler:))
and the framework isn’t able to complete the attestation. If you receive
this error, try the attestation again later using the same key and the same
value for the `clientDataHash` parameter. Retrying with the same inputs
helps to preserve the risk metric for a given device.

---

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)