Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Treat response.text() as a promise in error handling.
We [recently added some better exception handling](#9) but unfortunately printing the response body didn't work because [`response.text()` is a Promise](https://github.github.io/fetch/#response-body). The message looks like this: `ThriftRequestError: Thrift request failed: HTTP 503 Service Unavailable: [object Promise]` The fix is to use `.then()` to get the body.
- Loading branch information