---
title: "dailyPageViewController(_:didFailWithError:)"
framework: CareKit
role: symbol
role_heading: Instance Method
platforms: [iOS 13.0+, Mac Catalyst 13.0+, watchOS 7.0+]
path: "carekit/ockdailypageviewcontroller/dailypageviewcontroller(_:didfailwitherror:)"
---

# dailyPageViewController(_:didFailWithError:)

Notifies the delegate when your app encounters an unhandled error in a daily page view controller.

## Declaration

```swift
func dailyPageViewController(_ dailyPageViewController: OCKDailyPageViewController, didFailWithError error: Error)
```

## Parameters

- `dailyPageViewController`: The daily page view controller in which the error occurred.
- `error`: The error that occurred.

## See Also

### Handling Changes in the View Controller

- [dailyPageViewController(_:prepare:for:)](carekit/ockdailypageviewcontroller/dailypageviewcontroller(_:prepare:for:).md)
