Throw err at end of promise chain