<!--
{
  "availability" : [
    "iOS: 26.0.0 -",
    "iPadOS: 26.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "marketplacekit",
  "identifier" : "/documentation/MarketplaceKit/MarketplaceAppExtension/requestFailed(response:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "MarketplaceKit"
    ],
    "preciseIdentifier" : "s:14MarketplaceKit0A12AppExtensionP13requestFailed8responseSbSo17NSHTTPURLResponseC_tYaF"
  },
  "title" : "requestFailed(response:)"
}
-->

# requestFailed(response:)

Handles when the operating system receives an unexpected response from your web server.

```
func requestFailed(response: HTTPURLResponse) async -> Bool
```

## Parameters

`response`

An object that contains details of the response, such as the status code.

## Discussion

The system invokes your implementation of this callback when it receives anything but an OK status from your marketplace endpoints. Your implementation performs the necessary action according to the given status code. Your server might be down, or it might return a code that indicates that the person needs to reauthenticate if, for example, their access token expired.

For more information, see [Installing apps from an alternative marketplace](/documentation/marketplacekit/installing-apps-from-an-alternative-marketplace).

---

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)