improved error logging with .then()
Merge branch 'feature/error'

* feature/error:
  improved error logging with .then()