hono icon indicating copy to clipboard operation
hono copied to clipboard

Allow middleware to redirect after downstream errors

Open AyushCoder9 opened this issue 1 month ago • 1 comments

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

AyushCoder9 avatar Nov 24 '25 18:11 AyushCoder9

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.

codecov[bot] avatar Nov 25 '25 10:11 codecov[bot]