hono
hono copied to clipboard
Allow middleware to redirect after downstream errors
update compose so middleware can replace error responses when context.error is set, enabling patterns like c.redirect() after an error add regression test covering the /hello?name=error scenario to ensure middleware can trigger a redirect post-error captures the behavior reported in #4530 where redirects triggered in middleware were ignored after an error
Codecov Report
:white_check_mark: All modified and coverable lines are covered by tests.
:white_check_mark: Project coverage is 91.52%. Comparing base (342ff3b) to head (3ded05b).
Additional details and impacted files
@@ Coverage Diff @@
## main #4540 +/- ##
=======================================
Coverage 91.52% 91.52%
=======================================
Files 172 172
Lines 11221 11221
Branches 3255 3255
=======================================
Hits 10270 10270
Misses 950 950
Partials 1 1
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
:rocket: New features to boost your workflow:
- :snowflake: Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
- :package: JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.