Using the native (ES6) Promise. Should I reject with an Error:
Promise.reject(new Error('Something went wrong'));
Or should I just reject with a string:
Promise.reject('Something went wrong');
And what is the difference in browser behaviour?
question from:https://stackoverflow.com/questions/26020578/should-a-promise-reject-message-be-wrapped-in-error