-
Notifications
You must be signed in to change notification settings - Fork 12
Closed
Description
First of all I have to say this is a great library, well documented, explaining the rationale as well. I just can't figure out the equivalent of mapError as it exists in rust. I often find the need to map errors like so:
return Result.fromAsyncCatching(fetch(url, options))
.mapError((error) => new MyApplicationError('Fetching failed'))
.map((response) => response.json())
.mapError((err) => new MyApplicationError('JSON parsing failed'))
Is there an equivalent?
Metadata
Metadata
Assignees
Labels
No labels