meta data for this page
JS
Promises
break promises chain
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
is
return Promise.reject(err) Promise.reject(err); return throw 'error'