<!--
{
  "availability" : [
    "iOS: 12.0.0 -",
    "iPadOS: 12.0.0 -",
    "macCatalyst: 14.0.0 -",
    "macOS: 11.0.0 -",
    "visionOS: 1.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "AuthenticationServices",
  "identifier" : "/documentation/AuthenticationServices/ASExtensionError/Code",
  "metadataVersion" : "0.1.0",
  "role" : "Enumeration",
  "symbol" : {
    "kind" : "Enumeration",
    "modules" : [
      "Authentication Services"
    ],
    "preciseIdentifier" : "c:@E@ASExtensionErrorCode"
  },
  "title" : "ASExtensionError.Code"
}
-->

# ASExtensionError.Code

The codes for a credential provider extension error.

```
enum Code
```

## Topics

### Codes

[`case credentialIdentityNotFound`](/documentation/AuthenticationServices/ASExtensionError/Code/credentialIdentityNotFound)

The credential identity was not found.

[`case failed`](/documentation/AuthenticationServices/ASExtensionError/Code/failed)

The operation failed.

[`case userCanceled`](/documentation/AuthenticationServices/ASExtensionError/Code/userCanceled)

The user canceled the operation.

[`case userInteractionRequired`](/documentation/AuthenticationServices/ASExtensionError/Code/userInteractionRequired)

User interaction is required.

### Enumeration Cases

[`case matchedExcludedCredential`](/documentation/AuthenticationServices/ASExtensionError/Code/matchedExcludedCredential)

This error should only be used for a passkey registration request, if the @c excludedCredentials property matches a known passkey.

### Initializers

[`init?(rawValue: Int)`](/documentation/AuthenticationServices/ASExtensionError/Code/init(rawValue:))

## Relationships

### Conforms To

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

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

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

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

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

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

---

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)