---
title: "nw_framer_mark_failed_with_error(_:_:)"
framework: network
role: symbol
role_heading: Function
path: "network/nw_framer_mark_failed_with_error(_:_:)"
---

# nw_framer_mark_failed_with_error(_:_:)

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

## Declaration

```swift
func nw_framer_mark_failed_with_error(_ framer: nw_framer_t, _ error_code: Int32)
```

## See Also

### Managing Instance Lifetime

- [nw_framer_mark_ready(_:)](network/nw_framer_mark_ready(_:).md)
- [nw_framer_prepend_application_protocol(_:_:)](network/nw_framer_prepend_application_protocol(_:_:).md)
- [nw_framer_set_stop_handler(_:_:)](network/nw_framer_set_stop_handler(_:_:).md)
- [nw_framer_stop_handler_t](network/nw_framer_stop_handler_t.md)
- [nw_framer_set_cleanup_handler(_:_:)](network/nw_framer_set_cleanup_handler(_:_:).md)
- [nw_framer_cleanup_handler_t](network/nw_framer_cleanup_handler_t.md)
