> For the complete documentation index, see [llms.txt](https://demystifyfp.gitbook.io/fstoolkit-errorhandling/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://demystifyfp.gitbook.io/fstoolkit-errorhandling/fstoolkit.errorhandling.jobresult/jobresult/fromunittask.md).

# fromUnitTask

Namespace: `FsToolkit.ErrorHandling`

Transforms a `Task` into a `Job<Result<unit, exn>>`

## Function Signature

```fsharp
Task -> Job<Result<unit, exn>>
```

## Examples

### Example 1

```fsharp
let result = JobResult.fromUnitTask (task { return () })
// job { return Ok () }
```

### Example 2

```fsharp
let result = JobResult.fromUnitTask (task { return System.Exception("error") })
// job { return Error "error" }
```
