---
title: handler
framework: combine
role: symbol
role_heading: Instance Property
path: combine/publishers/trycatch/handler
---

# handler

A closure that accepts the upstream failure as input and either returns a publisher to replace the upstream publisher or throws an error.

## Declaration

```swift
let handler: (Upstream.Failure) throws -> NewPublisher
```

## See Also

### Inspecting publisher properties

- [upstream](combine/publishers/trycatch/upstream.md)
