---
title: Publishers.SetFailureType
framework: combine
role: symbol
role_heading: Structure
path: combine/publishers/setfailuretype
---

# Publishers.SetFailureType

A publisher that appears to send a specified failure type.

## Declaration

```swift
struct SetFailureType<Upstream, Failure> where Upstream : Publisher, Failure : Error, Upstream.Failure == Never
```

## Overview

Overview The publisher can’t actually fail with the specified type and finishes normally. Use this publisher type when you need to match the error types for two mismatched publishers.

## Topics

### Creating a set failure type publisher

- [init(upstream:)](combine/publishers/setfailuretype/init(upstream:).md)

### Setting failure type

- [setFailureType(to:)](combine/publishers/setfailuretype/setfailuretype(to:).md)

### Declaring supporting types

- [Publishers.SetFailureType.Output](combine/publishers/setfailuretype/output.md)

### Inspecting publisher properties

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

### Comparing publishers

- [==(_:_:)](combine/publishers/setfailuretype/==(_:_:).md)

### Default Implementations

- [Equatable Implementations](combine/publishers/setfailuretype/equatable-implementations.md)

## Relationships

### Conforms To

- [Equatable](swift/equatable.md)
- [Publisher](combine/publisher.md)

## See Also

### Mapping elements

- [Publishers.Map](combine/publishers/map.md)
- [Publishers.TryMap](combine/publishers/trymap.md)
- [Publishers.MapError](combine/publishers/maperror.md)
- [Publishers.Scan](combine/publishers/scan.md)
- [Publishers.TryScan](combine/publishers/tryscan.md)
