---
title: "session(_:didFailWithError:)"
framework: arkit
role: symbol
role_heading: Instance Method
path: "arkit/arsessionobserver/session(_:didfailwitherror:)"
---

# session(_:didFailWithError:)

Tells the delegate that the session has stopped running due to an error.

## Declaration

```swift
optional func session(_ session: ARSession, didFailWithError error: any Error)
```

## Parameters

- `session`: The session providing information.
- `error`: An object describing the failure.

## See Also

### Handling Errors

- [ARErrorDomain](arkit/arerrordomain.md)
