<!--
{
  "availability" : [
    "iOS: 13.4.0 -",
    "iPadOS: 13.4.0 -",
    "macCatalyst: 14.0.0 -",
    "macOS: 10.15.4 -"
  ],
  "documentType" : "symbol",
  "framework" : "AutomaticAssessmentConfiguration",
  "identifier" : "/documentation/AutomaticAssessmentConfiguration/AEAssessmentSessionDelegate/assessmentSession(_:wasInterruptedWithError:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "Automatic Assessment Configuration"
    ],
    "preciseIdentifier" : "c:objc(pl)AEAssessmentSessionDelegate(im)assessmentSession:wasInterruptedWithError:"
  },
  "title" : "assessmentSession(_:wasInterruptedWithError:)"
}
-->

# assessmentSession(_:wasInterruptedWithError:)

Tells the delegate that a system failure interrupted the session.

```
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

If one or more subsystems fail during a session, the session tells its delegate by calling the [`assessmentSession(_:wasInterruptedWithError:)`](/documentation/AutomaticAssessmentConfiguration/AEAssessmentSessionDelegate/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()`](/documentation/AutomaticAssessmentConfiguration/AEAssessmentSession/end()) method:

```swift
func assessmentSession(_ session: AEAssessmentSession, wasInterruptedWithError error: Error) {
    // Hide sensitive UI and optionally store assessment progress.

    // End the session.
    session.end()
}
```

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)