---
title: HMError.Code.alreadyExists
framework: homekit
role: symbol
role_heading: Case
path: homekit/hmerror/code/alreadyexists
---

# HMError.Code.alreadyExists

An error indicating the container already contains the object you are trying to add.

## Declaration

```swift
case alreadyExists
```

## See Also

### Related Documentation

- [HomeKit Developer Guide](apple-archive/documentation/NetworkingInternet/Conceptual/HomeKitDeveloperGuide/Introduction.md)

### General errors

- [HMError.Code.genericError](homekit/hmerror/code/genericerror.md)
- [incompatibleHomeHub](homekit/hmerror/code/incompatiblehomehub.md)
- [HMError.Code.invalidClass](homekit/hmerror/code/invalidclass.md)
- [HMError.Code.notFound](homekit/hmerror/code/notfound.md)
- [HMError.Code.notificationAlreadyEnabled](homekit/hmerror/code/notificationalreadyenabled.md)
- [HMError.Code.notificationNotSupported](homekit/hmerror/code/notificationnotsupported.md)
- [HMError.Code.operationNotSupported](homekit/hmerror/code/operationnotsupported.md)
- [HMError.Code.unexpectedError](homekit/hmerror/code/unexpectederror.md)
- [HMError.Code.missingEntitlement](homekit/hmerror/code/missingentitlement.md)
- [HMError.Code.referToUserManual](homekit/hmerror/code/refertousermanual.md)
