<!--
{
  "availability" : [
    "iOS: 16.0.0 -",
    "iPadOS: 16.0.0 -",
    "macCatalyst: 16.0.0 -",
    "macOS: -",
    "visionOS: 1.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "DeviceDiscoveryExtension",
  "identifier" : "/documentation/DeviceDiscoveryExtension/DDErrorHandler",
  "metadataVersion" : "0.1.0",
  "role" : "Type Alias",
  "symbol" : {
    "kind" : "Type Alias",
    "modules" : [
      "DeviceDiscoveryExtension"
    ],
    "preciseIdentifier" : "c:@T@DDErrorHandler"
  },
  "title" : "DDErrorHandler"
}
-->

# DDErrorHandler

A function that executes code you provide when an operation returns an error or completes successfully.

```
typealias DDErrorHandler = ((any Error)?) -> Void
```

## Parameters

`inError`

A reference that the framework assigns an error object when the operation fails. When the operation succeeds, the value may be `nil` or [`DDError.Code.success`](/documentation/DeviceDiscoveryExtension/DDError/Code/success).

---

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)