Skip to content

Conversation

kastov
Copy link

@kastov kastov commented Oct 17, 2025

PR Checklist

Please check if your PR fulfills the following requirements:

PR Type

What kind of change does this PR introduce?

  • Bugfix

What is the current behavior?

Throw an error in any middleware (which in excluded route for serve-static), setup global catch-all error handler in main.ts. Turn on logging and you will see that you receiving error from serve-static (404), instead of your own.

What is the new behavior?

Original error passed to next.

Does this PR introduce a breaking change?

  • Yes
  • No

Other information

@kastov
Copy link
Author

kastov commented Oct 17, 2025

I seen this issue #1729 and PR #1728. But i believe we should just pass all errors, not only specific ones.

Current behavior is really confusing anyway.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

1 participant