<!--
{
  "availability" : [
    "iOS: 13.0.0 -",
    "iPadOS: 13.0.0 -",
    "macCatalyst: 13.1.0 -",
    "macOS: 10.15.0 -",
    "tvOS: 13.0.0 -",
    "visionOS: 1.0.0 -",
    "watchOS: 6.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "SoundAnalysis",
  "identifier" : "/documentation/SoundAnalysis/SNResultsObserving/request(_:didFailWithError:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "Sound Analysis"
    ],
    "preciseIdentifier" : "c:objc(pl)SNResultsObserving(im)request:didFailWithError:"
  },
  "title" : "request(_:didFailWithError:)"
}
-->

# request(_:didFailWithError:)

Provides any errors that occur during processing of the request.

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

## Parameters

`request`

The request that produces the error.

`error`

The error that occurs during the request.

## Discussion

The analyzer stops processing a specific request when it encounters an error, and doesn’t call [`requestDidComplete(_:)`](/documentation/SoundAnalysis/SNResultsObserving/requestDidComplete(_:)).

---

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)