• sugar_in_your_tea
    link
    fedilink
    arrow-up
    3
    ·
    1 year ago

    You can also do map_err, which is a bit cleaner while keeping the mapping obvious. If you really need to do some logic on error, extracting that to the calling function is often better.