> 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/taskresultoption/error.md).

# error

### TaskResultOption.error

Namespace: `FsToolkit.ErrorHandling`

Lift an `'error` value into an `Task<Result<'ok option, 'error>>`

### Function Signature:

```fsharp
'error -> Task<Result<'ok option, 'error>>
```

### Examples

#### Example 1

```fsharp
let result : Task<Result<int option, string>> =
  TaskResultOption.error "Something bad happened"
```
