<!--
{
  "availability" : [
    "iOS: 3.0.0 - 18.0.0",
    "iPadOS: 3.0.0 - 18.0.0",
    "macCatalyst: 13.1.0 - 18.0.0",
    "macOS: 10.7.0 - 15.0.0",
    "tvOS: -",
    "visionOS: 1.0.0 - 2.0.0",
    "watchOS: 6.2.0 - 11.0.0"
  ],
  "documentType" : "symbol",
  "framework" : "StoreKit",
  "identifier" : "/documentation/StoreKit/SKRequestDelegate/request(_:didFailWithError:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "StoreKit"
    ],
    "preciseIdentifier" : "c:objc(pl)SKRequestDelegate(im)request:didFailWithError:"
  },
  "title" : "request(_:didFailWithError:)"
}
-->

# request(_:didFailWithError:)

Tells the delegate that the request failed to execute.

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

## Parameters

`request`

The request that failed.

`error`

The error that caused the request to fail.

## Discussion

When the request fails, your application should release the request. The [`requestDidFinish(_:)`](/documentation/StoreKit/SKRequestDelegate/requestDidFinish(_:)) method is not called after this method is called.

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)