GrantivaError, which conforms to LocalizedError.
Error types
| Error | When | Suggested action |
|---|---|---|
deviceNotSupported | App Attest unavailable (simulator, old device) | Fall back to API key mode for development |
attestationNotAvailable | App Attest not supported in this region | Degrade gracefully |
networkError(Error) | Network communication failed | Retry with backoff |
validationFailed | Server rejected the attestation | Device may be compromised — block or challenge |
tokenExpired | JWT token has expired | Call refreshToken() or validateAttestation() |
configurationError | Invalid Bundle ID or Team ID | Check SDK initialization |
keyGenerationFailed | Can’t create attestation key | Retry; may indicate Keychain issue |
challengeExpired | Server challenge timed out | Retry — the SDK handles this automatically |
invalidResponse | Unexpected server response format | Check SDK/server version compatibility |
rateLimited | Too many requests | Back off and retry after delay |
feedbackNotAvailable | Feedback not enabled for this tenant | Check your plan includes feedback |
Example
Localized descriptions
EveryGrantivaError case provides a human-readable errorDescription: