mapError

JobResult.mapError

Namespace: FsToolkit.ErrorHandling

Function Signature:

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

Examples

Example 1

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

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

Last updated