---
title: "contactsListViewController(_:didEncounterError:)"
framework: CareKit
role: symbol
role_heading: Instance Method
platforms: [iOS 13.0+, Mac Catalyst 13.0+, watchOS 7.0+]
path: "carekit/ockcontactslistviewcontrollerdelegate/contactslistviewcontroller(_:didencountererror:)"
---

# contactsListViewController(_:didEncounterError:)

Alerts the delegate when the contact list view controller encounters a relevant error.

## Declaration

```swift
func contactsListViewController(_ viewController: OCKContactsListViewController, didEncounterError: Error)
```

## Parameters

- `viewController`: The view controller in which the error occurred.
- `didEncounterError`: The error that occurred.
