---
title: Failure
framework: swift
role: symbol
role_heading: Associated Type
path: swift/asyncsequence/failure
---

# Failure

The type of errors produced when iteration over the sequence fails.

## Declaration

```swift
associatedtype Failure = any Error where Self.Failure == Self.AsyncIterator.Failure
```
