<!--
{
  "availability" : [
    "iOS: 12.0.0 -",
    "iPadOS: 12.0.0 -",
    "macCatalyst: 12.0.0 -",
    "macOS: 10.14.0 -",
    "tvOS: 12.0.0 -",
    "visionOS: 1.0.0 -",
    "watchOS: 5.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "Network",
  "identifier" : "/documentation/Network/NWError",
  "metadataVersion" : "0.1.0",
  "role" : "Enumeration",
  "symbol" : {
    "kind" : "Enumeration",
    "modules" : [
      "Network"
    ],
    "preciseIdentifier" : "s:7Network7NWErrorO"
  },
  "title" : "NWError"
}
-->

# NWError

The errors returned by objects in the Network framework.

```
enum NWError
```

## Topics

### Checking Error Types

[`NWError.posix(_:)`](/documentation/Network/NWError/posix(_:))

A POSIX error, which is used for most network protocol and routing errors.

[`NWError.dns(_:)`](/documentation/Network/NWError/dns(_:))

A DNS error encountered in resolving, browsing, or advertising.

[`NWError.tls(_:)`](/documentation/Network/NWError/tls(_:))

A TLS error reported by a TLS connection or listener.

### Inspecting Errors

## Relationships

### Conforms To

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

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

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

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

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

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

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

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

---

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)