Skip to content

Commit

Permalink
feat: http transport includes more information in error message when …
Browse files Browse the repository at this point in the history
…encountering non-ok http response
  • Loading branch information
gobengo committed Feb 21, 2024
1 parent 3784293 commit d5f6916
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/transport/src/http.js
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ class Channel {

const buffer = response.ok
? await response.arrayBuffer()
: HTTPError.throw('HTTP Request failed', response)
: HTTPError.throw(`HTTP Request failed. ${this.method} ${this.url.href}${response.status}`, response)

return {
headers: response.headers.entries
Expand Down

0 comments on commit d5f6916

Please sign in to comment.