Error class in JS has the message property.
We should try to throw Error object instead of other random stuff like boolean, string etc.
This includes errors thrown from Promise.reject()
E.g. In the codes below, test(f1) works while test(f2) does not.