---
title: "assessmentSession(_:wasInterruptedWithError:)"
framework: automaticassessmentconfiguration
role: symbol
role_heading: Instance Method
path: "automaticassessmentconfiguration/aeassessmentsessiondelegate/assessmentsession(_:wasinterruptedwitherror:)"
---

# assessmentSession(_:wasInterruptedWithError:)

Tells the delegate that a system failure interrupted the session.

## Declaration

```swift
optional func assessmentSession(_ session: AEAssessmentSession, wasInterruptedWithError error: any Error)
```

## Parameters

- `session`: The session that failed.
- `error`: An error that provides information about the interruption.

## Discussion

Discussion If one or more subsystems fail during a session, the session tells its delegate by calling the assessmentSession(_:wasInterruptedWithError:) method. If your app receives this callback, immediately stop the assessment, hide all sensitive content, and end the session. Because it might take time for your app to stop the assessment, the session relies on your app to call the end() method:

## See Also

### Responding to session start and stop

- [assessmentSessionDidBegin(_:)](automaticassessmentconfiguration/aeassessmentsessiondelegate/assessmentsessiondidbegin(_:).md)
- [assessmentSession(_:failedToBeginWithError:)](automaticassessmentconfiguration/aeassessmentsessiondelegate/assessmentsession(_:failedtobeginwitherror:).md)
- [assessmentSessionDidEnd(_:)](automaticassessmentconfiguration/aeassessmentsessiondelegate/assessmentsessiondidend(_:).md)
