<!--
{
  "availability" : [
    "iOS: 27.0.0 -",
    "iPadOS: 27.0.0 -",
    "macCatalyst: 18.2.0 -",
    "macOS: 12.3.0 -",
    "tvOS: 27.0.0 -",
    "visionOS: 27.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "ScreenCaptureKit",
  "identifier" : "/documentation/ScreenCaptureKit/SCStreamError",
  "metadataVersion" : "0.1.0",
  "role" : "Structure",
  "symbol" : {
    "kind" : "Structure",
    "modules" : [
      "ScreenCaptureKit"
    ],
    "preciseIdentifier" : "s:SC17SCStreamErrorCodeLeV"
  },
  "title" : "SCStreamError"
}
-->

# SCStreamError

An instance representing a ScreenCaptureKit framework error.

```
struct SCStreamError
```

## Overview> Important:
> When a user cancels a stream, the system calls an observer’s ``doc://com.apple.screencapturekit/documentation/ScreenCaptureKit/SCStreamDelegate/stream(_:didStopWithError:)`` method with ``doc://com.apple.screencapturekit/documentation/ScreenCaptureKit/SCStreamError/Code/userStopped``. Rather than treating this event as an error, handle it as an intentional user request.

## Topics

### Error inspection

[Error Constants](/documentation/ScreenCaptureKit/error-constants)

Error code constants for framework operations.

[`enum Code`](/documentation/ScreenCaptureKit/SCStreamError/Code)

Codes for user cancellation events and errors that can occur in ScreenCaptureKit.

[`static var errorDomain: String`](/documentation/ScreenCaptureKit/SCStreamError/errorDomain)

### Type Properties

[`static var insufficientStorage: SCStreamError.Code`](/documentation/ScreenCaptureKit/SCStreamError/insufficientStorage)

[`static var missingBackgroundMode: SCStreamError.Code`](/documentation/ScreenCaptureKit/SCStreamError/missingBackgroundMode)

[`static var notSupported: SCStreamError.Code`](/documentation/ScreenCaptureKit/SCStreamError/notSupported)

## Relationships

### Conforms To

[`Sendable`](/documentation/Swift/Sendable)

[`SendableMetatype`](/documentation/Swift/SendableMetatype)

[`CustomNSError`](/documentation/Foundation/CustomNSError)

[`Hashable`](/documentation/Swift/Hashable)

[`Error`](/documentation/Swift/Error)

[`Equatable`](/documentation/Swift/Equatable)

---

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)