now reject promise on errors