What is the recommended way to extract a string-type error message from a value of type Js.Promise.error
?
Thanks,
Ethan
What is the recommended way to extract a string-type error message from a value of type Js.Promise.error
?
Thanks,
Ethan
You can stringify the error with Js.String.make(yourError)
Personally, I only use that in the case when the error comes from outside of my realm (e.g. a HTTP-client error) or when JSON decoding fails.
Great! Thank you for the information.