if you don't return anything, you are effectively returning a resolved promise for the value undefined
Promise.reject()
sets only Promise state, not break the code flow, so return statement is requiredthrow
isreturn Promise.reject(err) Promise.reject(err); return throw 'error'