---
title: CBATTError
framework: corebluetooth
role: symbol
role_heading: Structure
path: corebluetooth/cbatterror-swift.struct
---

# CBATTError

An error that Core Bluetooth returns while using Attribute Protocol (ATT).

## Declaration

```swift
struct CBATTError
```

## Topics

### Error Codes

- [success](corebluetooth/cbatterror-swift.struct/success.md)
- [invalidHandle](corebluetooth/cbatterror-swift.struct/invalidhandle.md)
- [readNotPermitted](corebluetooth/cbatterror-swift.struct/readnotpermitted.md)
- [writeNotPermitted](corebluetooth/cbatterror-swift.struct/writenotpermitted.md)
- [invalidPdu](corebluetooth/cbatterror-swift.struct/invalidpdu.md)
- [insufficientAuthentication](corebluetooth/cbatterror-swift.struct/insufficientauthentication.md)
- [requestNotSupported](corebluetooth/cbatterror-swift.struct/requestnotsupported.md)
- [invalidOffset](corebluetooth/cbatterror-swift.struct/invalidoffset.md)
- [insufficientAuthorization](corebluetooth/cbatterror-swift.struct/insufficientauthorization.md)
- [prepareQueueFull](corebluetooth/cbatterror-swift.struct/preparequeuefull.md)
- [attributeNotFound](corebluetooth/cbatterror-swift.struct/attributenotfound.md)
- [attributeNotLong](corebluetooth/cbatterror-swift.struct/attributenotlong.md)
- [insufficientEncryptionKeySize](corebluetooth/cbatterror-swift.struct/insufficientencryptionkeysize.md)
- [invalidAttributeValueLength](corebluetooth/cbatterror-swift.struct/invalidattributevaluelength.md)
- [unlikelyError](corebluetooth/cbatterror-swift.struct/unlikelyerror.md)
- [insufficientEncryption](corebluetooth/cbatterror-swift.struct/insufficientencryption.md)
- [unsupportedGroupType](corebluetooth/cbatterror-swift.struct/unsupportedgrouptype.md)
- [insufficientResources](corebluetooth/cbatterror-swift.struct/insufficientresources.md)

### Enumerations

- [CBATTError.Code](corebluetooth/cbatterror-swift.struct/code.md)

### Type Properties

- [errorDomain](corebluetooth/cbatterror-swift.struct/errordomain.md)

## Relationships

### Conforms To

- [CustomNSError](foundation/customnserror.md)
- [Equatable](swift/equatable.md)
- [Error](swift/error.md)
- [Hashable](swift/hashable.md)
- [Sendable](swift/sendable.md)
- [SendableMetatype](swift/sendablemetatype.md)

## See Also

### Errors

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