Repository navigation
docs: correct error-handling details in reference pages - #6323
Merged
Merged
Conversation
- Observability reference: navigation failures (a throwing beforeEnter() or view constructor) never reach the session error handler, because Router.navigate() catches them and renders an error view. They aren't counted by vaadin.errors; point to the navigation timer instead. - Configuration properties: remove enableErrorHandlerRedirect. The flag was removed before 24.3.0 shipped; DefaultErrorHandler always redirects to a matching error view. Reword the matching sentence in Custom Error Handling, which implied it had to be enabled. - Router exceptions: any HasErrorParameter for the same exception type replaces a @DefaultErrorHandler view, extending it or not. Only two unrelated non-default handlers conflict. Also fix the non-existent ParentLayouts and BeforeNavigationEvent names in the same paragraph. - Custom error handler: drop the unneeded UI.access() wrapper (Flow calls the handler with the session locked) and add the missing space in the notification message. - Enabling security: custom access-denied views return 403 FORBIDDEN rather than 401 UNAUTHORIZED. - Show notification: use VaadinIcon.CLOSE instead of CLOSE_SMALL, which is deprecated for removal, and the theme-neutral ButtonVariant.TERTIARY instead of the Lumo-only LUMO_TERTIARY_INLINE. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Contributor
Preview DeploymentThis PR has been deployed for preview. URL: https://docs-preview-pr-6323.fly.dev Changed pagesAdded content is highlighted in green; removed content is marked in red on each page.
Built from 026d5d0 |
peholmst
added a commit
that referenced
this pull request
Oct 9, 2026
…v25.3) (#6332) Co-authored-by: Petter Holmström <petter@vaadin.com> Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes six inaccuracies in reference pages about error handling, found while writing the error-handling guide in #6321. Each was checked against the Flow 25.3.3 sources (
com.vaadin:flow-server), and the Observability Kit item was also checked against the kit's own bytecode.tools/observability/reference.adocbeforeEnter()among the failures routed to the session error handlerRouter.navigate()catches every navigation exception and renders an error view throughhandleExceptionNavigation(), so these never reach theErrorHandlerandvaadin.errorsdoesn't count them. A short paragraph now says so and points to the navigation timer. In the kit, onlyErrorMetricsBinder(the decorated handler) andRequestMetricsBinder(the request interceptor) incrementvaadin.errors.flow/configuration/properties.adocenableErrorHandlerRedirect(defaultfalse)InitParametershas no such parameter. It was added in vaadin/flow#17791 and removed in vaadin/flow#18105 before 24.3.0 shipped.DefaultErrorHandler.error()always callsErrorHandlerUtil.handleErrorByRedirectingToErrorView(). The sentence incustom-error-handler.adocthat said this behavior had to be "enabled" is reworded to match.flow/routing/exceptions.adocHasErrorParameterfor the same exception type replaces a@DefaultErrorHandlerview, whether it extends it or not (AbstractRouteRegistry.handleRegisteredExceptionType). Two of your own handlers for the same type must be in a subclass relationship (the subclass wins), or startup fails withInvalidRouteConfigurationException. The same paragraph also named two classes that don't exist,ParentLayoutsandBeforeNavigationEvent. They're now@ParentLayoutandBeforeEnterEvent.flow/advanced/custom-error-handler.adocNotification.show()inUI.getCurrent().access(), and the message had no space between "occurred." and "Contact"flow/security/enabling-security.adocUNAUTHORIZED(401)FORBIDDEN(403), which fits an authenticated user who lacks permission.building-apps/ui-basics/show-notification.adocVaadinIcon.CLOSE_SMALLandButtonVariant.LUMO_TERTIARY_INLINEVaadinIcon.CLOSE(CLOSE_SMALLis@Deprecated(since = "25.3", forRemoval = true)) and the theme-neutralButtonVariant.TERTIARY.Vale reports no alerts on the changed lines.
🤖 Generated with Claude Code