Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Regression bug - added request header is no longer available in WebErrorHandler #3684

Open
yanivnahoum opened this issue Feb 3, 2025 · 0 comments

Comments

@yanivnahoum
Copy link

In Spring Boot 3.4.2/Spring Cloud 2024.0.0, I have a route that forwards gateway requests to a local controller. The route adds a custom header using the AddRequestHeader filter. The local controller method expects a query param. When the parameter is missing, an exception is thrown. It is then caught in a custom WebExceptionHandler that attempts to extract the header from the ServerRequest and log it , but the header is missing. It also includes the header value in the response via a custom ErrorAttributes bean.
This exact same scenario works in Spring Boot 3.3.8/Spring Cloud 2023.0.5

Minimal reproducible example can be found here
Follow the instructions in the README

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

No branches or pull requests

1 participant