<!--
{
  "availability" : [
    "iOS: 16.0.0 -",
    "iPadOS: 16.0.0 -",
    "macCatalyst: 16.0.0 -",
    "macOS: 13.0.0 -",
    "watchOS: 10.1.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "SafetyKit",
  "identifier" : "/documentation/SafetyKit/SAError/Code",
  "metadataVersion" : "0.1.0",
  "role" : "Enumeration",
  "symbol" : {
    "kind" : "Enumeration",
    "modules" : [
      "SafetyKit"
    ],
    "preciseIdentifier" : "c:@E@SAErrorCode"
  },
  "title" : "SAError.Code"
}
-->

# SAError.Code

Codes for identifying errors in SafetyKit.

```
enum Code
```

## Topics

### Determining the error type

[`case invalidArgument`](/documentation/SafetyKit/SAError/Code/invalidArgument)

The passed argument is invalid.

[`case notAllowed`](/documentation/SafetyKit/SAError/Code/notAllowed)

The system restricts the feature on this iPhone at the current time.

[`case notAuthorized`](/documentation/SafetyKit/SAError/Code/notAuthorized)

The app isn’t authorized to perform the requested operation.

[`case operationFailed`](/documentation/SafetyKit/SAError/Code/operationFailed)

The requested operation failed; retrying may succeed.

### Initializers

[`init?(rawValue: Int)`](/documentation/SafetyKit/SAError/Code/init(rawValue:))

## Relationships

### Conforms To

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

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

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

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

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

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

---

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)