pass the error to reject()