---
title: "requestFailed(response:)"
framework: marketplacekit
role: symbol
role_heading: Instance Method
path: "marketplacekit/marketplaceappextension/requestfailed(response:)"
---

# requestFailed(response:)

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

## Declaration

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

## Parameters

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

## Mentioned in

Reauthenticating a person to manage apps Installing apps from an alternative marketplace

## Discussion

Discussion iOS 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 expires. For more information, see Installing apps from an alternative marketplace.
