---
title: DDErrorHandler
framework: DeviceDiscoveryExtension
role: symbol
role_heading: Type Alias
platforms: [iOS 16.0+, iPadOS 16.0+, Mac Catalyst 16.0+, visionOS 1.0+]
path: devicediscoveryextension/dderrorhandler
---

# DDErrorHandler

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

## Declaration

```swift
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 doc://com.apple.devicediscoveryextension/documentation/DeviceDiscoveryExtension/DDError/Code/success.

## See Also

### Errors

- [DDError](devicediscoveryextension/dderror.md)
- [DDError.Code](devicediscoveryextension/dderror/code.md)
- [DDErrorOutType](devicediscoveryextension/dderrorouttype.md)
- [DDErrorDomain](devicediscoveryextension/dderrordomain.md)
