Yeah, but somehow I thought that Promise.catch() was simply the Promise.reject()'s callback, not the actual catch of an implicit throw-catch block wrapping everything.
This way, what would be the best practice to keep the catched error to show in the console? Should I just do something like this?
(and, well, I guess also change the "message" property name, to stop overriding Error.message with the actual description of the response)Code:// ... .catch(response => { console.error(response.message); });
Pretty much. Note that it'll handle all exceptions/rejections for the chain so you might get different data shapes. Otherwise handle exceptions where they happen.