---
title: CBError.Code
framework: corebluetooth
role: symbol
role_heading: Enumeration
path: corebluetooth/cberror-swift.struct/code
---

# CBError.Code

The codes for errors that Core Bluetooth returns during Bluetooth transactions.

## Declaration

```swift
enum Code
```

## Topics

### Error Codes

- [CBError.Code.unknown](corebluetooth/cberror-swift.struct/code/unknown.md)
- [CBError.Code.invalidParameters](corebluetooth/cberror-swift.struct/code/invalidparameters.md)
- [CBError.Code.invalidHandle](corebluetooth/cberror-swift.struct/code/invalidhandle.md)
- [CBError.Code.notConnected](corebluetooth/cberror-swift.struct/code/notconnected.md)
- [CBError.Code.outOfSpace](corebluetooth/cberror-swift.struct/code/outofspace.md)
- [CBError.Code.operationCancelled](corebluetooth/cberror-swift.struct/code/operationcancelled.md)
- [CBError.Code.connectionTimeout](corebluetooth/cberror-swift.struct/code/connectiontimeout.md)
- [CBError.Code.peripheralDisconnected](corebluetooth/cberror-swift.struct/code/peripheraldisconnected.md)
- [CBError.Code.uuidNotAllowed](corebluetooth/cberror-swift.struct/code/uuidnotallowed.md)
- [CBError.Code.alreadyAdvertising](corebluetooth/cberror-swift.struct/code/alreadyadvertising.md)
- [CBError.Code.connectionFailed](corebluetooth/cberror-swift.struct/code/connectionfailed.md)
- [CBError.Code.connectionLimitReached](corebluetooth/cberror-swift.struct/code/connectionlimitreached.md)
- [CBError.Code.operationNotSupported](corebluetooth/cberror-swift.struct/code/operationnotsupported.md)
- [unknownDevice](corebluetooth/cberror-swift.struct/code/unknowndevice.md)
- [CBError.Code.unkownDevice](corebluetooth/cberror-swift.struct/code/unkowndevice.md)

### Enumeration Cases

- [CBError.Code.channelSoundingConfigurationFailed](corebluetooth/cberror-swift.struct/code/channelsoundingconfigurationfailed.md)
- [CBError.Code.channelSoundingProcedureFailed](corebluetooth/cberror-swift.struct/code/channelsoundingprocedurefailed.md)
- [CBError.Code.encryptionTimedOut](corebluetooth/cberror-swift.struct/code/encryptiontimedout.md)
- [CBError.Code.leGattExceededBackgroundNotificationLimit](corebluetooth/cberror-swift.struct/code/legattexceededbackgroundnotificationlimit.md)
- [CBError.Code.leGattNearBackgroundNotificationLimit](corebluetooth/cberror-swift.struct/code/legattnearbackgroundnotificationlimit.md)
- [CBError.Code.peerRemovedPairingInformation](corebluetooth/cberror-swift.struct/code/peerremovedpairinginformation.md)
- [CBError.Code.tooManyLEPairedDevices](corebluetooth/cberror-swift.struct/code/toomanylepaireddevices.md)

### Initializers

- [init(rawValue:)](corebluetooth/cberror-swift.struct/code/init(rawvalue:).md)

## Relationships

### Conforms To

- [BitwiseCopyable](swift/bitwisecopyable.md)
- [Equatable](swift/equatable.md)
- [Hashable](swift/hashable.md)
- [RawRepresentable](swift/rawrepresentable.md)
- [Sendable](swift/sendable.md)
- [SendableMetatype](swift/sendablemetatype.md)

## See Also

### Errors

- [CBError](corebluetooth/cberror-swift.struct.md)
- [CBErrorDomain](corebluetooth/cberrordomain.md)
- [CBATTError](corebluetooth/cbatterror-swift.struct.md)
- [CBATTErrorDomain](corebluetooth/cbatterrordomain.md)
- [CBATTError.Code](corebluetooth/cbatterror-swift.struct/code.md)
- [CBATTError](corebluetooth/cbatterror-swift.struct.md)
