---
title: "request(_:didFailWithError:)"
framework: storekit
role: symbol
role_heading: Instance Method
path: "storekit/skrequestdelegate/request(_:didfailwitherror:)"
---

# request(_:didFailWithError:)

Tells the delegate that the request failed to execute.

## Declaration

```swift
optional func request(_ request: SKRequest, didFailWithError error: any Error)
```

## Parameters

- `request`: The request that failed.
- `error`: The error that caused the request to fail.

## Mentioned in

Handling errors

## Discussion

Discussion When the request fails, your application should release the request. The requestDidFinish(_:) method is not called after this method is called.
