<!--
{
  "availability" : [
    "iOS: 9.0.0 -",
    "iPadOS: 9.0.0 -",
    "macCatalyst: 13.1.0 -",
    "macOS: 10.11.0 -",
    "tvOS: 9.0.0 -",
    "visionOS: 1.0.0 -",
    "watchOS: 2.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "NetworkExtension",
  "identifier" : "/documentation/NetworkExtension/NEAppProxyFlowError-swift.struct/Code",
  "metadataVersion" : "0.1.0",
  "role" : "Enumeration",
  "symbol" : {
    "kind" : "Enumeration",
    "modules" : [
      "Network Extension"
    ],
    "preciseIdentifier" : "c:@E@NEAppProxyFlowError"
  },
  "title" : "NEAppProxyFlowError.Code"
}
-->

# NEAppProxyFlowError.Code

Error codes that the app proxy flow API declares.

```
enum Code
```

## Topics

### Error Codes

[`NEAppProxyFlowErrorNotConnected`](/documentation/NetworkExtension/NEAppProxyFlowError-swift.struct/Code/notConnected)

The flow is not fully opened.

[`NEAppProxyFlowErrorPeerReset`](/documentation/NetworkExtension/NEAppProxyFlowError-swift.struct/Code/peerReset)

The remote peer closed the flow.

[`NEAppProxyFlowErrorHostUnreachable`](/documentation/NetworkExtension/NEAppProxyFlowError-swift.struct/Code/hostUnreachable)

An attempt to reach the remote endpoint of the flow failed.

[`NEAppProxyFlowErrorInvalidArgument`](/documentation/NetworkExtension/NEAppProxyFlowError-swift.struct/Code/invalidArgument)

A proxy flow method received an invalid argument.

[`NEAppProxyFlowErrorAborted`](/documentation/NetworkExtension/NEAppProxyFlowError-swift.struct/Code/aborted)

The flow was aborted.

[`NEAppProxyFlowErrorRefused`](/documentation/NetworkExtension/NEAppProxyFlowError-swift.struct/Code/refused)

Connecting the flow to its remote endpoint failed.

[`NEAppProxyFlowErrorTimedOut`](/documentation/NetworkExtension/NEAppProxyFlowError-swift.struct/Code/timedOut)

The flow timed out.

[`NEAppProxyFlowErrorInternal`](/documentation/NetworkExtension/NEAppProxyFlowError-swift.struct/Code/internal)

An internal error occurred while handling the flow.

[`NEAppProxyFlowErrorDatagramTooLarge`](/documentation/NetworkExtension/NEAppProxyFlowError-swift.struct/Code/datagramTooLarge)

A caller attempted to write a datagram that was larger than the socket’s receive window.

[`NEAppProxyFlowErrorReadAlreadyPending`](/documentation/NetworkExtension/NEAppProxyFlowError-swift.struct/Code/readAlreadyPending)

A read operation on the flow is already pending.

## Relationships

### Conforms To

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

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

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

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

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

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

---

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)