Could you add an error code to the error object? Currently, the only thing usefull is a string (.message). But I have to translate the error message. So I now check on (a part of) the string (e.g. “validation failed”), but if you ever decide to change this part of the message, my code breaks.
Related topics
Topic | Replies | Views | Activity | |
---|---|---|---|---|
How to Search text in Error | 1 | 66 | July 28, 2020 | |
What are the properties associated with the error object passed in a catch()? | 3 | 194 | August 24, 2021 | |
how to add a onFailure( ) messeage | 0 | 134 | February 15, 2018 | |
How to modify and object | 1 | 490 | July 20, 2018 | |
Password error message | 0 | 103 | September 16, 2020 |