• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

stores-com / http-error / 25706014963
100%
main: 96%

Build:
Build:
LAST BUILD BRANCH: from-response-json
DEFAULT BRANCH: main
Ran 12 May 2026 12:41AM UTC
Jobs 1
Files 1
Run time 1min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

12 May 2026 12:41AM UTC coverage: 100.0%. Remained the same
25706014963

Pull #1

github

freshlogic
add HttpError.fromJson() for 2xx responses with error envelopes

GraphQL servers always return 200 OK with errors carried in data.errors[],
and some REST APIs (FedEx, etc.) do the same — a 2xx response carries an
application-level errors envelope. Callers that need to throw on those
already have the parsed body in hand from response.json() and just want to
attach it to an HttpError.

HttpError.fromJson(response, json) is a synchronous factory that sets
err.json = json and err.text = JSON.stringify(json), leaving the message
at the default "${status} ${statusText}" so callers can override it with
whatever aggregated form makes sense for their API.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Pull Request #1: Add HttpError.fromJson() for 2xx responses with error envelopes

6 of 6 branches covered (100.0%)

Branch coverage included in aggregate %.

16 of 16 new or added lines in 1 file covered. (100.0%)

51 of 51 relevant lines covered (100.0%)

2.06 hits per line

Jobs
ID Job ID Ran Files Coverage
1 25706014963.1 12 May 2026 12:41AM UTC 1
100.0
GitHub Action Run
Source Files on build 25706014963
  • Tree
  • List 1
  • Changed 1
  • Source Changed 1
  • Coverage Changed 1
Coverage ∆ File Lines Relevant Covered Missed Hits/Line Branch Hits Branch Misses
  • Back to Repo
  • Github Actions Build #25706014963
  • Pull Request #1
  • PR Base - main (#22679707696)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc