---
title: "markFailed(error:)"
framework: network
role: symbol
role_heading: Instance Method
path: "network/nwprotocolframer/instance/markfailed(error:)"
---

# markFailed(error:)

Indicates to a connection that your protocol has encountered an error, or has gracefully closed.

## Declaration

```swift
final func markFailed(error: NWError?)
```

## See Also

### Managing Instance Lifetime

- [markReady()](network/nwprotocolframer/instance/markready().md)
- [prependApplicationProtocol(options:)](network/nwprotocolframer/instance/prependapplicationprotocol(options:).md)
