---
title: serverUnavailable
framework: DeviceCheck
role: symbol
role_heading: Type Property
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/serverunavailable
---

# serverUnavailable

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

## Declaration

```swift
static var serverUnavailable: DCError.Code { get }
```

## Mentioned in

Establishing your app’s integrity

## 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

### Errors

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