closing promise chains to make sure errors are thrown