---
title: DCError.Code.serverUnavailable
framework: DeviceCheck
role: symbol
role_heading: Case
platforms: [iOS 11.0+, iPadOS 11.0+, Mac Catalyst 13.1+, macOS 10.15+, tvOS 11.0+, visionOS 1.0+, watchOS 9.0+]
path: devicecheck/dcerror-swift.struct/code/serverunavailable
---

# DCError.Code.serverUnavailable

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

## Declaration

```swift
case serverUnavailable
```

## Discussion

Discussion You receive this error when you call 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.

## See Also

### Error codes

- [DCError.Code.featureUnsupported](devicecheck/dcerror-swift.struct/code/featureunsupported.md)
- [DCError.Code.invalidInput](devicecheck/dcerror-swift.struct/code/invalidinput.md)
- [DCError.Code.invalidKey](devicecheck/dcerror-swift.struct/code/invalidkey.md)
- [DCError.Code.unknownSystemFailure](devicecheck/dcerror-swift.struct/code/unknownsystemfailure.md)
