Return Error object for failed Api requests and fixed flaky test.

The output of done(err) is 'Error: [object Object]' if err is not an Error, but I agree with you that we should keep all the info for the users.
Maybe stringify body.error as error message?