Skip to content

Latest commit

 

History

History
22 lines (14 loc) · 453 Bytes

File metadata and controls

22 lines (14 loc) · 453 Bytes

AsyncResult.mapError

Namespace: FsToolkit.ErrorHandling

Function Signature:

('a -> 'b) -> Async<Result<'c, 'a>> -> Async<Result<'c, 'b>>

Examples

Example 1

From the AsyncResult.map example, if we want to map the error part alone, we can do it as below:

// Async<Result<PostId>, string>
createPost createPostRequest
|> AsyncResult.mapError (fun (ex : exn) -> ex.Message)