You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 049bfdf
Browse filesBrowse the repository at this point in the historyBrowse files
fix: make route config errors more prominent (#20847)
When route configuration errors happen, make sure to output the actual error message as the first output at ERROR level. When this is detected at startup, we can't prevent printing out the stack trace too since the container does that when initialization throws. Also checked all the messages for different route misconfiguration cases, and they seem to be fine.
Fixes#20589
Copy file name to clipboardExpand all lines: flow-server/src/main/java/com/vaadin/flow/router/internal/RouteUtil.java
+6Lines changed: 6 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -70,6 +70,12 @@
70
70
*/
71
71
publicclassRouteUtil {
72
72
73
+
privatestaticfinalStringROUTE_CONFLICT_PREFIX = "Navigation target paths (considering @Route, @RouteAlias and @RoutePrefix values) must be unique, found navigation targets '%s' and '%s' ";
"Navigation targets must have unique routes, found navigation targets 'com.vaadin.flow.router.internal.ConfigureRoutesTest$BaseTarget' and 'com.vaadin.flow.router.internal.ConfigureRoutesTest$BaseTarget' with the same route.");
"Duplicate parameter routes shouldn't be accepted.");
129
-
exceptionRule.expectMessage(
130
-
"Navigation targets must have unique routes, found navigation targets 'com.vaadin.flow.router.internal.ConfigureRoutesTest$ParamTarget' and 'com.vaadin.flow.router.internal.ConfigureRoutesTest$ParamTarget' with parameter have the same route.");
0 commit comments