---
title: "Product.TaskState.failure(_:)"
framework: storekit
role: symbol
role_heading: Case
path: "storekit/product/taskstate/failure(_:)"
---

# Product.TaskState.failure(_:)

The task failed with an error.

## Declaration

```swift
case failure(any Error)
```

## See Also

### Task states

- [Product.TaskState.loading](storekit/product/taskstate/loading.md)
- [Product.TaskState.success(_:)](storekit/product/taskstate/success(_:).md)
- [Product.TaskState.unavailable](storekit/product/taskstate/unavailable.md)
