---
title: error
framework: networkextension
role: symbol
role_heading: Instance Property
path: networkextension/nwtcpconnection/error
---

# error

The connection-wide error property.

## Declaration

```swift
var error: (any Error)? { get }
```

## Discussion

Discussion Indicates any fatal error that occurred while processing the connection or performing data reading or writing. Use Key-Value Observing to watch this property.

## See Also

### Monitoring the connection status

- [state](networkextension/nwtcpconnection/state.md)
- [NWTCPConnectionState](networkextension/nwtcpconnectionstate.md)
- [isViable](networkextension/nwtcpconnection/isviable.md)
