mapFailure maps a function over the existing error messages in case of failure. In case of success, the message type will be changed and warnings will be discarded.
This is handy when we get a Result from another domain and we want to convert it to be compatible with our domain message type.
It is also helpful when we convert a Choice into a Result to match the type of Choice2Of2 with our domain message type.
mapFailure
maps a function over the existing error messages in case of failure. In case of success, the message type will be changed and warnings will be discarded.This is handy when we get a Result from another domain and we want to convert it to be compatible with our domain message type.
It is also helpful when we convert a Choice into a Result to match the type of Choice2Of2 with our domain message type.