Skip to content

feat(http/unstable): HttpError#7132

Open
iuioiua wants to merge 3 commits intodenoland:mainfrom
iuioiua:http-error
Open

feat(http/unstable): HttpError#7132
iuioiua wants to merge 3 commits intodenoland:mainfrom
iuioiua:http-error

Conversation

@iuioiua
Copy link
Copy Markdown
Contributor

@iuioiua iuioiua commented May 8, 2026

This PR brings back the HttpError class, which I regret removing in #3736 (sorry Kitson 🥲). It's a very versatile class that can be called anywhere in the call stack and handled in a unified way in the "master" request handler. I've been using this in my own projects and love it.

This class is already implemented in Oak (not identially) and Fresh (a more minimal version).

I think it'd also be worth updating handlers within @std/http to throw errors instead of returning responses, allowing the dev to handle their own errors.

Written by me. Checked by Claude Code.

@github-actions github-actions Bot added the http label May 8, 2026
@codecov
Copy link
Copy Markdown

codecov Bot commented May 8, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 94.61%. Comparing base (a496da2) to head (5ce5c24).

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #7132   +/-   ##
=======================================
  Coverage   94.61%   94.61%           
=======================================
  Files         634      635    +1     
  Lines       51801    51816   +15     
  Branches     9329     9330    +1     
=======================================
+ Hits        49011    49026   +15     
  Misses       2216     2216           
  Partials      574      574           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@iuioiua iuioiua marked this pull request as ready for review May 8, 2026 00:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant