---
title: "locationManager(_:monitoringDidFailFor:withError:)"
framework: corelocation
role: symbol
role_heading: Instance Method
path: "corelocation/cllocationmanagerdelegate/locationmanager(_:monitoringdidfailfor:witherror:)"
---

# locationManager(_:monitoringDidFailFor:withError:)

Tells the delegate that a region monitoring error occurred.

## Declaration

```swift
optional func locationManager(_ manager: CLLocationManager, monitoringDidFailFor region: CLRegion?, withError error: any Error)
```

## Parameters

- `manager`: The location manager object reporting the event.
- `region`: The region for which the error occurred.
- `error`: An error object containing the error code that indicates why region monitoring failed.

## Discussion

Discussion If an error occurs while trying to monitor a given region, the location manager sends this message to its delegate. Region monitoring might fail because the region itself cannot be monitored or because there was a more general failure in configuring the region monitoring service. Although implementation of this method is optional, it is recommended that you implement it if you use region monitoring in your application.

## See Also

### Related Documentation

- [locationManager(_:didFailWithError:)](corelocation/cllocationmanagerdelegate/locationmanager(_:didfailwitherror:).md)
