This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
@stores.com/http-error is an Error subclass for non-ok HTTP responses from the Fetch API. It captures the response body as .text and .json for debugging.
npm test # Run tests
npm run coveralls # Run tests with coverage
npx eslint . # LintSingle-file module exporting an HttpError class:
new HttpError(response)— creates error with message"${status} ${statusText}", setscauseto the responseHttpError.from(response)— async factory that also captures.textand.jsonfrom the response body (using.clone()to avoid consuming the original)
- Arrow functions preferred
node:prefix for built-in modules- Alphabetize string arrays and YAML keys
node:testflat test pattern with{ concurrency: true }on parent groups- No destructuring