<!--
{
  "availability" : [
    "iOS: 8.0.0 -",
    "iPadOS: 8.0.0 -",
    "macCatalyst: 8.0.0 -",
    "tvOS: 10.0.0 -",
    "visionOS: 1.0.0 -",
    "watchOS: 2.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "HomeKit",
  "identifier" : "/documentation/HomeKit/HMError/Code",
  "metadataVersion" : "0.1.0",
  "role" : "Enumeration",
  "symbol" : {
    "kind" : "Enumeration",
    "modules" : [
      "HomeKit"
    ],
    "preciseIdentifier" : "c:@E@HMErrorCode"
  },
  "title" : "HMError.Code"
}
-->

# HMError.Code

Possible error values that can be returned from HomeKit APIs.

```
enum Code
```

## Topics

### Accessory errors

[`HMErrorCodeAccessoryIsBlocked`](/documentation/HomeKit/HMError/Code/accessoryIsBlocked)

An error indicating a blocked accessory.

[`HMErrorCodeAccessoryIsBusy`](/documentation/HomeKit/HMError/Code/accessoryIsBusy)

An error indicating the accessory is busy.

[`HMErrorCodeAccessoryIsSuspended`](/documentation/HomeKit/HMError/Code/accessoryIsSuspended)

The accessory is suspended.

[`HMErrorCodeAccessoryNotReachable`](/documentation/HomeKit/HMError/Code/accessoryNotReachable)

An error indicating the accessory is not reachable over the network.

[`HMErrorCodeAccessoryOutOfCompliance`](/documentation/HomeKit/HMError/Code/accessoryOutOfCompliance)

An error indicating the accessory is out of compliance.

[`HMErrorCodeAccessoryOutOfResources`](/documentation/HomeKit/HMError/Code/accessoryOutOfResources)

An error indicating the accessory is out of resources.

[`HMErrorCodeAccessoryPoweredOff`](/documentation/HomeKit/HMError/Code/accessoryPoweredOff)

An error indicating the accessory is off.

[`HMErrorCodeAccessoryResponseError`](/documentation/HomeKit/HMError/Code/accessoryResponseError)

An error with the accessory’s response.

[`HMErrorCodeAddAccessoryFailed`](/documentation/HomeKit/HMError/Code/addAccessoryFailed)

A failed attempt to add an accessory.

[`HMErrorCodeIncompatibleAccessory`](/documentation/HomeKit/HMError/Code/incompatibleAccessory)

The accessory is incompatible.

### Action set errors

[`HMErrorCodeActionInAnotherActionSet`](/documentation/HomeKit/HMError/Code/actionInAnotherActionSet)

An attempt to add an action that exists in one action set to another action set.

[`HMErrorCodeActionSetExecutionFailed`](/documentation/HomeKit/HMError/Code/actionSetExecutionFailed)

An attempt to execute the action set failed.

[`HMErrorCodeActionSetExecutionInProgress`](/documentation/HomeKit/HMError/Code/actionSetExecutionInProgress)

An error indicating the execution of the action set is in progress.

[`HMErrorCodeActionSetExecutionPartialSuccess`](/documentation/HomeKit/HMError/Code/actionSetExecutionPartialSuccess)

An attempt to execute the action set was only partially successful.

[`HMErrorCodeCannotRemoveBuiltinActionSet`](/documentation/HomeKit/HMError/Code/cannotRemoveBuiltinActionSet)

An error indicating the built-in action set cannot be removed.

[`HMErrorCodeNoActionsInActionSet`](/documentation/HomeKit/HMError/Code/noActionsInActionSet)

An attempt to execute an action set with no actions.

[`HMErrorCodeNoRegisteredActionSets`](/documentation/HomeKit/HMError/Code/noRegisteredActionSets)

An attempt to activate a trigger with no action sets.

### Association errors

[`HMErrorCodeInvalidAssociatedServiceType`](/documentation/HomeKit/HMError/Code/invalidAssociatedServiceType)

An error indicating an invalid service type.

[`HMErrorCodeObjectAlreadyAssociatedToHome`](/documentation/HomeKit/HMError/Code/objectAlreadyAssociatedToHome)

An attempt to associate an object with a home when it’s already associated with that home.

[`HMErrorCodeObjectAssociatedToAnotherHome`](/documentation/HomeKit/HMError/Code/objectAssociatedToAnotherHome)

An attempt to associate an object with a home when it’s already associated with another home.

[`HMErrorCodeObjectNotAssociatedToAnyHome`](/documentation/HomeKit/HMError/Code/objectNotAssociatedToAnyHome)

An attempt to perform an operation on an object that is not associated to any home.

### Authorization errors

[`HMErrorCodeInvalidOrMissingAuthorizationData`](/documentation/HomeKit/HMError/Code/invalidOrMissingAuthorizationData)

An error indicating the authorization data is invalid or missing.

[`HMErrorCodeLocationForHomeDisabled`](/documentation/HomeKit/HMError/Code/locationForHomeDisabled)

An error indicating the home’s location is disabled.

[`HMErrorCodeHomeAccessNotAuthorized`](/documentation/HomeKit/HMError/Code/homeAccessNotAuthorized)

An error indicating access to the home was not authorized.

[`HMErrorCodeInsufficientPrivileges`](/documentation/HomeKit/HMError/Code/insufficientPrivileges)

An error indicating insufficient privileges for the operation.

[`HMErrorCodeMessageAuthenticationFailed`](/documentation/HomeKit/HMError/Code/messageAuthenticationFailed)

A message authentication failure.

[`HMErrorCodeNotAuthorizedForLocationServices`](/documentation/HomeKit/HMError/Code/notAuthorizedForLocationServices)

An error indicating location services are not authorized.

[`HMErrorCodeNotAuthorizedForMicrophoneAccess`](/documentation/HomeKit/HMError/Code/notAuthorizedForMicrophoneAccess)

An error indicating microphone access is not authorized.

[`HMErrorCodeNotSignedIntoiCloud`](/documentation/HomeKit/HMError/Code/notSignedIntoiCloud)

An error indicating the user is not signed into iCloud.

[`HMErrorCodeOwnershipFailure`](/documentation/HomeKit/HMError/Code/ownershipFailure)

The ownership code did not match.

[`HMErrorCodeSecurityFailure`](/documentation/HomeKit/HMError/Code/securityFailure)

A security failure.

### Bridge errors

[`HMErrorCodeBridgedAccessoryNotReachable`](/documentation/HomeKit/HMError/Code/bridgedAccessoryNotReachable)

An error indicating the bridged accessory cannot be reached.

[`HMErrorCodeCannotRemoveNonBridgeAccessory`](/documentation/HomeKit/HMError/Code/cannotRemoveNonBridgeAccessory)

An attempt to remove a bridged accessory.

[`HMErrorCodeCannotUnblockNonBridgeAccessory`](/documentation/HomeKit/HMError/Code/cannotUnblockNonBridgeAccessory)

An error indicating a non-bridge accessory cannot be unblocked.

### Characteristic errors

[`HMErrorCodeReadOnlyCharacteristic`](/documentation/HomeKit/HMError/Code/readOnlyCharacteristic)

An attempt to modify a read-only value.

[`HMErrorCodeWriteOnlyCharacteristic`](/documentation/HomeKit/HMError/Code/writeOnlyCharacteristic)

An attempt to read from a write-only characteristic.

### Collision errors

[`HMErrorCodeHomeWithSimilarNameExists`](/documentation/HomeKit/HMError/Code/homeWithSimilarNameExists)

An attempt to assign a home the same name as an existing home.

[`HMErrorCodeObjectWithSimilarNameExists`](/documentation/HomeKit/HMError/Code/objectWithSimilarNameExists)

An object with a similar name already exists.

[`HMErrorCodeObjectWithSimilarNameExistsInHome`](/documentation/HomeKit/HMError/Code/objectWithSimilarNameExistsInHome)

An attempt to give the name of one object to another object in the home.

[`HMErrorCodeRenameWithSimilarName`](/documentation/HomeKit/HMError/Code/renameWithSimilarName)

An attempt to rename an object with its current name.

### Communication errors

[`HMErrorCodeAccessDenied`](/documentation/HomeKit/HMError/Code/accessDenied)

An error indicating the current user doesn’t have privileges to perform the operation.

[`HMErrorCodeAccessoryCommunicationFailure`](/documentation/HomeKit/HMError/Code/accessoryCommunicationFailure)

The accessory failed to communicate.

[`HMErrorCodeAccessoryPairingFailed`](/documentation/HomeKit/HMError/Code/accessoryPairingFailed)

An attempt to pair with the accessory has failed.

[`HMErrorCodeAccessorySentInvalidResponse`](/documentation/HomeKit/HMError/Code/accessorySentInvalidResponse)

An error indicating the accessory sent an invalid response.

[`HMErrorCodeClientRequestError`](/documentation/HomeKit/HMError/Code/clientRequestError)

An error with the client request.

[`HMErrorCodeCommunicationFailure`](/documentation/HomeKit/HMError/Code/communicationFailure)

A communication failure.

[`HMErrorCodeDataResetFailure`](/documentation/HomeKit/HMError/Code/dataResetFailure)

An attempt to reset the data failed.

[`HMErrorCodeTimedOutWaitingForAccessory`](/documentation/HomeKit/HMError/Code/timedOutWaitingForAccessory)

An accessory did not respond timely.

### Device and discovery errors

[`HMErrorCodeDeviceLocked`](/documentation/HomeKit/HMError/Code/deviceLocked)

An error indicating the device is locked.

[`HMErrorCodeAccessoryDiscoveryFailed`](/documentation/HomeKit/HMError/Code/accessoryDiscoveryFailed)

An error indicating accessory discovery failed.

### General errors

[`HMErrorCodeAlreadyExists`](/documentation/HomeKit/HMError/Code/alreadyExists)

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

[`HMErrorCodeGenericError`](/documentation/HomeKit/HMError/Code/genericError)

An error that does not have a more specific error code.

[`incompatibleHomeHub`](/documentation/HomeKit/HMError/Code/incompatibleHomeHub)

An error indicating an incompatible home hub.

[`HMErrorCodeInvalidClass`](/documentation/HomeKit/HMError/Code/invalidClass)

An attempt to use an abstract base class in an operation instead of a concrete subclass.

[`HMErrorCodeNotFound`](/documentation/HomeKit/HMError/Code/notFound)

An error indicating the object was not found in the container.

[`HMErrorCodeNotificationAlreadyEnabled`](/documentation/HomeKit/HMError/Code/notificationAlreadyEnabled)

An error indicating the notification is already enabled.

[`HMErrorCodeNotificationNotSupported`](/documentation/HomeKit/HMError/Code/notificationNotSupported)

An attempt to register for notifications from an accessory that does not support notifications.

[`HMErrorCodeOperationNotSupported`](/documentation/HomeKit/HMError/Code/operationNotSupported)

An attempt to use an unsupported operation.

[`HMErrorCodeUnexpectedError`](/documentation/HomeKit/HMError/Code/unexpectedError)

An unexpected error.

[`HMErrorCodeMissingEntitlement`](/documentation/HomeKit/HMError/Code/missingEntitlement)

An error indicating a required entitlement is not available.

[`HMErrorCodeReferToUserManual`](/documentation/HomeKit/HMError/Code/referToUserManual)

An error described in the device’s user manual.

### Home and room errors

[`HMErrorCodeMaximumAccessoriesOfTypeInHome`](/documentation/HomeKit/HMError/Code/maximumAccessoriesOfTypeInHome)

The home already has the maximum number of accessories of the given type.

[`HMErrorCodeRoomForHomeCannotBeInZone`](/documentation/HomeKit/HMError/Code/roomForHomeCannotBeInZone)

An attempt to add the room that represents the entire home to a zone.

[`HMErrorCodeRoomForHomeCannotBeUpdated`](/documentation/HomeKit/HMError/Code/roomForHomeCannotBeUpdated)

An attempt to change the room that represents the entire home.

### Hub errors

[`HMErrorCodeNoHomeHub`](/documentation/HomeKit/HMError/Code/noHomeHub)

An error indicating no home hub found.

[`HMErrorCodeNoCompatibleHomeHub`](/documentation/HomeKit/HMError/Code/noCompatibleHomeHub)

An error indicating no compatible home hub found.

### Limit errors

[`HMErrorCodeCannotActivateTriggerTooFarInFuture`](/documentation/HomeKit/HMError/Code/cannotActivateTriggerTooFarInFuture)

An error indicating the trigger cannot be activated because it is set too far in the future.

[`HMErrorCodeDateMustBeOnSpecifiedBoundaries`](/documentation/HomeKit/HMError/Code/dateMustBeOnSpecifiedBoundaries)

An error indicating the date is not on the specified boundaries.

[`HMErrorCodeFireDateInPast`](/documentation/HomeKit/HMError/Code/fireDateInPast)

An attempt to activate a timer trigger with a date in the past.

[`HMErrorCodeInvalidMessageSize`](/documentation/HomeKit/HMError/Code/invalidMessageSize)

An error indicating an invalid message size.

[`HMErrorCodeMaximumObjectLimitReached`](/documentation/HomeKit/HMError/Code/maximumObjectLimitReached)

An error indicating the maximum object count has been reached.

[`HMErrorCodeRecurrenceTooLarge`](/documentation/HomeKit/HMError/Code/recurrenceTooLarge)

An attempt to use a recurrence period that is too large.

[`HMErrorCodeRecurrenceTooSmall`](/documentation/HomeKit/HMError/Code/recurrenceTooSmall)

An error indicating the recurrence interval is too short.

[`HMErrorCodeRecurrenceMustBeOnSpecifiedBoundaries`](/documentation/HomeKit/HMError/Code/recurrenceMustBeOnSpecifiedBoundaries)

An error indicating the recurrence rule is not on the specified boundaries.

### Network errors

[`HMErrorCodeEnterpriseNetworkNotSupported`](/documentation/HomeKit/HMError/Code/enterpriseNetworkNotSupported)

An enterprise network doesn’t support this accessory.

[`HMErrorCodeFailedToJoinNetwork`](/documentation/HomeKit/HMError/Code/failedToJoinNetwork)

The accessory failed to join the network.

[`HMErrorCodeIncompatibleNetwork`](/documentation/HomeKit/HMError/Code/incompatibleNetwork)

An error indicating an incompatible network.

[`HMErrorCodeNetworkUnavailable`](/documentation/HomeKit/HMError/Code/networkUnavailable)

An error indicating the network is unavailable.

[`HMErrorCodeWiFiCredentialGenerationFailed`](/documentation/HomeKit/HMError/Code/wiFiCredentialGenerationFailed)

WiFi credential generation failed.

### Operation errors

[`HMErrorCodeOperationCancelled`](/documentation/HomeKit/HMError/Code/operationCancelled)

An error indicating the user canceled the operation.

[`HMErrorCodeOperationInProgress`](/documentation/HomeKit/HMError/Code/operationInProgress)

An error indicating the operation is already in progress.

[`HMErrorCodeOperationTimedOut`](/documentation/HomeKit/HMError/Code/operationTimedOut)

An error indicating the operation timed out.

### Parameter errors

[`HMErrorCodeInvalidParameter`](/documentation/HomeKit/HMError/Code/invalidParameter)

An error indicating the object is invalid for the given operation.

[`HMErrorCodeMissingParameter`](/documentation/HomeKit/HMError/Code/missingParameter)

An error indicating a missing parameter.

[`HMErrorCodeNilParameter`](/documentation/HomeKit/HMError/Code/nilParameter)

An error indicating that `nil` was passed for an operation that does not accept `nil`.

[`HMErrorCodeUnconfiguredParameter`](/documentation/HomeKit/HMError/Code/unconfiguredParameter)

An error indicating an unconfigured parameter.

### Read and write errors

[`HMErrorCodeReadWriteFailure`](/documentation/HomeKit/HMError/Code/readWriteFailure)

An error indicating a failed read/write operation.

[`HMErrorCodeReadWritePartialSuccess`](/documentation/HomeKit/HMError/Code/readWritePartialSuccess)

An error indicating a partially successful read/write operation.

### Synchronization errors

[`HMErrorCodeCloudDataSyncInProgress`](/documentation/HomeKit/HMError/Code/cloudDataSyncInProgress)

An error indicating a data synchronization operation is in progress.

[`HMErrorCodeKeychainSyncNotEnabled`](/documentation/HomeKit/HMError/Code/keychainSyncNotEnabled)

An error indicating Keychain syncing is not enabled for the user.

### User errors

[`HMErrorCodeUserDeclinedAddingUser`](/documentation/HomeKit/HMError/Code/userDeclinedAddingUser)

An error indicating the user canceled the add user operation.

[`HMErrorCodeUserDeclinedRemovingUser`](/documentation/HomeKit/HMError/Code/userDeclinedRemovingUser)

An error indicating the user canceled the remove user operation.

[`HMErrorCodeUserDeclinedInvite`](/documentation/HomeKit/HMError/Code/userDeclinedInvite)

An error indicating the user declined the invitation.

[`HMErrorCodeUserIDNotEmailAddress`](/documentation/HomeKit/HMError/Code/userIDNotEmailAddress)

An error indicating the user’s ID is not a valid email address.

[`HMErrorCodeUserManagementFailed`](/documentation/HomeKit/HMError/Code/userManagementFailed)

A user management error not covered by the other errors.

### Value errors

[`HMErrorCodeInvalidDataFormatSpecified`](/documentation/HomeKit/HMError/Code/invalidDataFormatSpecified)

An error indicating an invalid data format was specified.

[`HMErrorCodeInvalidValueType`](/documentation/HomeKit/HMError/Code/invalidValueType)

An attempt to use an invalid value type.

[`HMErrorCodeNameContainsProhibitedCharacters`](/documentation/HomeKit/HMError/Code/nameContainsProhibitedCharacters)

An attempt to name an object with prohibited characters.

[`HMErrorCodeNameDoesNotEndWithValidCharacters`](/documentation/HomeKit/HMError/Code/nameDoesNotEndWithValidCharacters)

An error indicating the provided name has invalid characters at the end.

[`HMErrorCodeNameDoesNotStartWithValidCharacters`](/documentation/HomeKit/HMError/Code/nameDoesNotStartWithValidCharacters)

An attempt to start the name of an object with invalid characters.

[`HMErrorCodeStringLongerThanMaximum`](/documentation/HomeKit/HMError/Code/stringLongerThanMaximum)

An attempt to use a string longer than the maximum allowed.

[`HMErrorCodeStringShorterThanMinimum`](/documentation/HomeKit/HMError/Code/stringShorterThanMinimum)

An attempt to use a string shorter than the required minimum.

[`HMErrorCodeValueHigherThanMaximum`](/documentation/HomeKit/HMError/Code/valueHigherThanMaximum)

An attempt to use a numeric value higher than the specified maximum value.

[`HMErrorCodeValueLowerThanMinimum`](/documentation/HomeKit/HMError/Code/valueLowerThanMinimum)

An attempt to use a numeric value lower than the specified minimum value.

### Enumeration Cases

[`HMErrorCodePartialCommunicationFailure`](/documentation/HomeKit/HMError/Code/partialCommunicationFailure)

## Relationships

### Conforms To

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

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

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

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

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

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

---

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)