---
title: "home(_:didEncounterError:for:)"
framework: homekit
role: symbol
role_heading: Instance Method
path: "homekit/hmhomedelegate/home(_:didencountererror:for:)"
---

# home(_:didEncounterError:for:)

Tells the delegate that a configured accessory encountered an error.

## Declaration

```swift
optional func home(_ home: HMHome, didEncounterError error: any Error, for accessory: HMAccessory)
```

## Parameters

- `home`: The home.
- `error`: The error encountered by the accessory.
- `accessory`: The accessory that encountered the error.

## Discussion

Discussion The delegate should check whether the accessory is blocked.

## See Also

### Observing Accessories

- [home(_:didUnblockAccessory:)](homekit/hmhomedelegate/home(_:didunblockaccessory:).md)
