superbrave/verbose-error-http-client
A Laravel HTTP client wrapper that turns failed API requests into verbose, readable exceptions with status codes, headers, and response bodies, making third-party integrations easier to debug and fix.
Architecture fit
verbose-error-http-client is a cross-cutting observability adapter, not a domain dependency. It wraps Laravel's HTTP client / Symfony HttpClient exception handling so failed outbound calls surface the full upstream response (status, headers, body) instead of a truncated RequestException message. Architecturally that places it at the edge of the application: it should sit behind a shared client factory or a dedicated middleware, and it should never be referenced by domain code. Footprint is small (service provider + exception/middleware classes), so it is cheap to adopt and cheap to remove — the right risk profile for a package that only earns its keep during incident triage.
Integration feasibility
Composer-installable with Laravel package auto-discovery; the realistic integration is either (a) global — it replaces the default exception behaviour for every outbound call, or (b) opt-in per client/middleware. Which one applies determines the blast radius of this release. The practical cost is one line in composer.json plus a logging/redaction policy; there is no schema, queue, or infrastructure change.
Technical risk
The 2.2.0 change is deceptively scoped. A minor version bump carries a major dependency move: Symfony 7.4.* → 8.x. Symfony 8 raises the PHP floor (8.4+) and breaks constraint compatibility with any host application still on Symfony 7 or PHP 8.2/8.3. Two distinct risks:
^2.1 will resolve to 2.2.0 on the next composer update and fail resolution — or worse, succeed in CI on a newer image and fail on a production runtime pinned to PHP 8.3.^7.4 || ^8.0) or replaces (^8.0) the Symfony constraint is the single most important unknown. Widening is a safe minor; replacing is a breaking change mislabelled as a minor.Secondary risks: a verbose error surface is a data-exfiltration surface — full response bodies in exception messages mean upstream PII, tokens, and internal IDs land in logs, Sentry, and (if unhandled) user-facing 500 pages. And the package is agency-maintained with a small contributor base; this release added its first new contributor, which is a positive signal but does not constitute a support commitment.
Key questions
catch blocks) or only messages?Stack fit Best fit is a Laravel service consuming several third-party APIs where error diagnosis is currently guesswork. It adds value in proportion to how opaque your upstreams are — high for payment/ERP/logistics integrations, near-zero for services that already return structured correlation IDs.
Migration path
Treat 2.2.0 as not a drop-in minor. Pin to 2.1.2 now to freeze the current behaviour, then evaluate 2.2.0 in an isolated branch. If the constraint was replaced rather than widened, reclassify 2.2.0 internally as a major and schedule it with the PHP 8.4 runtime upgrade rather than bundling it into routine dependency refresh. If it was widened, adopt 2.2.0 as a routine patch-level change behind the same tests.
Compatibility Build a short matrix before merging: PHP version × Laravel version × Symfony major × package version. The decisive cell is PHP 8.3 + Symfony 7 — if any production service sits there, 2.2.0 is blocked until that runtime moves. Also verify your exception handler and error-tracking integration tolerate larger exception messages (Sentry payload caps, log shipping costs).
Sequencing
Maintenance Low ongoing effort between releases, but a forced upgrade cadence tracking Symfony majors — realistically every ~2 years you will be re-testing this package as part of a framework-wide PHP/Symfony uplift. Log it in the dependency register against the PHP floor, not the package version, since that is what actually gates you.
Support Agency-maintained, small contributor base, no commercial SLA. Acceptable for a diagnostic aid; not acceptable as a single point of failure in an error-handling path. Mitigation: it should degrade gracefully to default client behaviour if the package is removed, and the team should be able to read ~300 lines of source if it goes unmaintained.
Scaling Runtime cost is negligible — the code path only executes on failed requests. The scaling concern is observability cost: verbose bodies can multiply log volume and error-tracker spend by 10–100× during an upstream outage, because a burst of 5xx responses now ships full payloads. Bound body capture (size cap, header allowlist, field redaction) before enabling broadly.
Failure modes
composer update for teams on PHP <8.4 — surfaces as a build break, not an incident.catch-by-message logic.Ramp-up Developer ramp-up is near-zero — install, trigger a failure, read the message. The TPM-level ramp-up is the part that matters: a written redaction and environment policy ("full bodies in local/staging, size-capped and redacted in production, never surfaced to end users"), plus a reviewer note that this package changes what gets logged, which puts it in scope for security review, not just code review.
How can I help you explore Laravel packages today?