---
title: "closeReadWithError(_:)"
framework: networkextension
role: symbol
role_heading: Instance Method
path: "networkextension/neappproxyflow/closereadwitherror(_:)"
---

# closeReadWithError(_:)

Close the flow for further read operations.

## Declaration

```swift
func closeReadWithError(_ error: (any Error)?)
```

## Parameters

- `error`: An doc://com.apple.documentation/documentation/Foundation/NSError object indicating to the system the error that led to the closure. If the flow is not being closed due to an error, this parameter should be set to nil. See NEAppProxyFlowError below for a list of acceptable error codes.

## Mentioned in

Handling Flow Copying

## See Also

### Managing the flow life cycle

- [open(withLocalEndpoint:completionHandler:)](networkextension/neappproxyflow/open(withlocalendpoint:completionhandler:).md)
- [closeWriteWithError(_:)](networkextension/neappproxyflow/closewritewitherror(_:).md)
