<!--
{
  "availability" : [
    "iOS: 11.3.0 -",
    "iPadOS: 11.3.0 -",
    "macCatalyst: 11.3.0 -",
    "macOS: 11.0.0 -",
    "visionOS: 1.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "ClassKit",
  "identifier" : "/documentation/ClassKit/CLSError",
  "metadataVersion" : "0.1.0",
  "role" : "Structure",
  "symbol" : {
    "kind" : "Structure",
    "modules" : [
      "ClassKit"
    ],
    "preciseIdentifier" : "s:SC12CLSErrorCodeLeV"
  },
  "title" : "CLSError"
}
-->

# CLSError

Errors issued by ClassKit.

```
struct CLSError
```

## Topics

### Error domain

[`let CLSErrorCodeDomain: String`](/documentation/ClassKit/CLSErrorCodeDomain)

The error domain that ClassKit uses when issuing errors.

### Error codes

[`static var none: CLSError.Code`](/documentation/ClassKit/CLSError/none)

No error.

[`static var authorizationDenied: CLSError.Code`](/documentation/ClassKit/CLSError/authorizationDenied)

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

[`static var classKitUnavailable: CLSError.Code`](/documentation/ClassKit/CLSError/classKitUnavailable)

ClassKit isn’t available on this device.

[`static var databaseInaccessible: CLSError.Code`](/documentation/ClassKit/CLSError/databaseInaccessible)

ClassKit isn’t accessible because the device is locked.

[`static var errorDomain: String`](/documentation/ClassKit/CLSError/errorDomain)

[`static var invalidAccountCredentials: CLSError.Code`](/documentation/ClassKit/CLSError/invalidAccountCredentials)

[`static var invalidArgument: CLSError.Code`](/documentation/ClassKit/CLSError/invalidArgument)

An invalid argument was provided to the API.

[`static var invalidCreate: CLSError.Code`](/documentation/ClassKit/CLSError/invalidCreate)

An attempt to save a new object that already exists in the data store failed.

[`static var invalidModification: CLSError.Code`](/documentation/ClassKit/CLSError/invalidModification)

An attempt to modify a read-only object failed.

[`static var invalidUpdate: CLSError.Code`](/documentation/ClassKit/CLSError/invalidUpdate)

ClassKit failed to save an updated object in the data store.

[`static var limits: CLSError.Code`](/documentation/ClassKit/CLSError/limits)

A limit has been exceeded.

[`static var partialFailure: CLSError.Code`](/documentation/ClassKit/CLSError/partialFailure)

ClassKit encountered more than one error.

[`enum Code`](/documentation/ClassKit/CLSError/Code)

Error codes that ClassKit issues.

### User information

[`struct CLSErrorUserInfoKey`](/documentation/ClassKit/CLSErrorUserInfoKey)

Keys that appear in the user info dictionary in errors that ClassKit creates.

## Relationships

### Conforms To

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

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

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

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

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

[`CustomNSError`](/documentation/Foundation/CustomNSError)

---

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)