<!--
{
  "availability" : [
    "iOS: 27.0.0 -",
    "iPadOS: 27.0.0 -",
    "macCatalyst: 27.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "MediaDevice",
  "identifier" : "/documentation/MediaDevice/MediaDeviceRoutingManager/discoveryFailed(_:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "Media Device"
    ],
    "preciseIdentifier" : "s:11MediaDevice0aB14RoutingManagerC15discoveryFailedyyAA0aB5ErrorVF"
  },
  "title" : "discoveryFailed(_:)"
}
-->

# discoveryFailed(_:)

Reports a discovery failure to the system, indicating that the extension was unable to search for devices.

```
@MainActor final func discoveryFailed(_ error: MediaDeviceError)
```

## Parameters

`error`

The error describing why discovery failed.

## Discussion

Call this function when discovery is prevented in an unexpected way. Do not call this function when devices are simply not discovered.

---

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)