---
title: NSUserScriptTask.CompletionHandler
framework: foundation
role: symbol
role_heading: Type Alias
path: foundation/nsuserscripttask/completionhandler
---

# NSUserScriptTask.CompletionHandler

Implement this block to retrieve the error of the script executed by execute(completionHandler:).

## Declaration

```swift
typealias CompletionHandler = @Sendable ((any Error)?) -> Void
```
