<!--
{
  "availability" : [
    "iOS: 8.0.0 -",
    "iPadOS: 8.0.0 -",
    "macCatalyst: 13.1.0 -",
    "macOS: 10.11.0 -",
    "tvOS: 17.0.0 -",
    "visionOS: 1.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "NetworkExtension",
  "identifier" : "/documentation/NetworkExtension/NEVPNError-swift.struct",
  "metadataVersion" : "0.1.0",
  "role" : "Structure",
  "symbol" : {
    "kind" : "Structure",
    "modules" : [
      "Network Extension"
    ],
    "preciseIdentifier" : "s:SC10NEVPNErrorLeV"
  },
  "title" : "NEVPNError"
}
-->

# NEVPNError

Information about an error encountered while configuring or using a VPN.

```
struct NEVPNError
```

## Topics

### Creating an error instance

### Inspecting error properties

[`NEVPNError.Code`](/documentation/NetworkExtension/NEVPNError-swift.struct/Code)

Codes that indicate the source of an error.

### Error codes

[`configurationDisabled`](/documentation/NetworkExtension/NEVPNError-swift.struct/configurationDisabled)

An error code that indicates the VPN configuration associated with the VPN manager isn’t enabled.

[`configurationInvalid`](/documentation/NetworkExtension/NEVPNError-swift.struct/configurationInvalid)

An error code that indicates the VPN configuration associated with the VPN manager object is invalid.

[`connectionFailed`](/documentation/NetworkExtension/NEVPNError-swift.struct/connectionFailed)

An error code that indicates the connection to the VPN server failed.

[`configurationStale`](/documentation/NetworkExtension/NEVPNError-swift.struct/configurationStale)

An error code that indicates another process modfied the VPN configuration since the last time the app loaded the configuration.

[`configurationReadWriteFailed`](/documentation/NetworkExtension/NEVPNError-swift.struct/configurationReadWriteFailed)

An error code that indicates an error occurred while reading or writing the Network Extension preferences.

[`configurationUnknown`](/documentation/NetworkExtension/NEVPNError-swift.struct/configurationUnknown)

An error code that indicates that unspecified error occurred.

### Comparing errors

### Hashing

### Comparing error instances

---

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)