<!--
{
  "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(_:failedToBeginWithError:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "Automatic Assessment Configuration"
    ],
    "preciseIdentifier" : "c:objc(pl)AEAssessmentSessionDelegate(im)assessmentSession:failedToBeginWithError:"
  },
  "title" : "assessmentSession(_:failedToBeginWithError:)"
}
-->

# assessmentSession(_:failedToBeginWithError:)

Tells the delegate that the session failed to start.

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

## Parameters

`session`

The session that failed to start.

`error`

An error that provides information about why the session failed.

## Discussion

After your app calls a session’s [`begin()`](/documentation/AutomaticAssessmentConfiguration/AEAssessmentSession/begin()) method, the session asynchronously disables the appropriate system services and then calls its delegate’s [`assessmentSessionDidBegin(_:)`](/documentation/AutomaticAssessmentConfiguration/AEAssessmentSessionDelegate/assessmentSessionDidBegin(_:)) method. However, if the session fails to start for any reason, it calls the [`assessmentSession(_:failedToBeginWithError:)`](/documentation/AutomaticAssessmentConfiguration/AEAssessmentSessionDelegate/assessmentSession(_:failedToBeginWithError:)) method instead. Don’t start any assessments if your app receives this callback.

---

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)