-
Notifications
You must be signed in to change notification settings - Fork 164
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
Status returned by HasErrorParameter#setErrorParameter is ignored. #13421
Comments
running the application with
So it is the js bootstrap that does a 200 response and later receives the 404 response for the non existent route. |
@caalador thanks for advice. I confirm that your workaround works. |
Hi, I can confirm that the same issue is for Vaadin 22. |
The reason for this behaviour is that with the integration between Flow and Hilla, the server cannot know that there won't be a client-side route that would handle the same URL and it will therefore not even try to resolve server-side routes while generating the initial HTML response. The problem would thus not be that returning I haven't tried this in practice, but I believe you can override this behaviour by setting the |
Returns 404 for non existant views Helps with #13421
Apart from the bug addressed in #14036, the documentation is currently misleading here to not mention a different behavior with and without |
* fix: Use correct view when using eagerServerLoad Returns 404 for non-existant views Helps with #13421
* fix: Use correct view when using eagerServerLoad Returns 404 for non-existant views Helps with #13421
* fix: Use correct view when using eagerServerLoad Returns 404 for non-existant views Helps with #13421
I can confirm that with 23.1.3 For SpringBoot apps just add
|
Second problem with |
@mshabarov FYI: the mentioned workaround to use "vaadin.useDeprecatedV14Bootstrapping=true" has caused multiple reports on discord and stack overflow that it renders the UI twice (see comments above as well) - this should either documented or fixed.. because people run into this when migrating from V14 |
@knoobie thanks for a reminder, Flow team will take a look how it can be fixed. |
Hi! I also faced the "twice rendering" issue https://stackoverflow.com/questions/75166305/vaadin23-vaadin-eagerserverload-true-and-beforeenterobserver |
Some fundamental bugs in eager server load should be fixed by #16498 |
All reported issues with |
Description of the bug
I just downloaded sample project from start.vaadin.com and added RouteNotFoundView almost same as in documentation.
But it still returns HTTP status 200 and ignores
HttpServletResponse.SC_NOT_FOUND
Expected behavior
Status 404 or any other status, which set as return value should be returned instead.
Minimal reproducible example
RouteNotFoundView
given at bug description.Versions
The text was updated successfully, but these errors were encountered: