Skip to content

feat: Improve error messaging for discover routes#53

Closed
mshabarov wants to merge 3 commits into
mainfrom
discoverRoutes
Closed

feat: Improve error messaging for discover routes#53
mshabarov wants to merge 3 commits into
mainfrom
discoverRoutes

Conversation

@mshabarov
Copy link
Copy Markdown
Contributor

Makes the ServiceConfigurationError more informative for browserless testing. Says that it's needed to override discoverRoutes to get the tests to run.

@mshabarov
Copy link
Copy Markdown
Contributor Author

⚠️ Formatting check failed.

Reply with /format to automatically apply formatting fixes to this PR.

/format

@mshabarov mshabarov marked this pull request as draft May 4, 2026 11:56
@mshabarov mshabarov self-assigned this May 13, 2026
@mshabarov mshabarov moved this from 🔎Iteration reviews to ⚒️ In progress in Vaadin Flow | Hilla | Kits ongoing work May 13, 2026
@mshabarov mshabarov marked this pull request as ready for review May 21, 2026 10:53
@mshabarov mshabarov moved this from ⚒️ In progress to 🔎Iteration reviews in Vaadin Flow | Hilla | Kits ongoing work May 21, 2026
@mshabarov mshabarov requested a review from mcollovati May 21, 2026 10:54
.map(pkg -> routesCache.computeIfAbsent(pkg,
p -> new Routes().autoDiscoverViews(p)))
.reduce(new Routes(), Routes::merge);
} catch (ServiceConfigurationError e) {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this is not the right place to handle the exception. ServiceConfigurationError is never thrown during autoDiscoverViews() execution.

According to this comment, most likely the error comes from Flow initialization that happens later on.
We need to try to reproduce the issue and verify if we need to move this patch to another point in the codebase.

@mcollovati
Copy link
Copy Markdown
Contributor

I couldn't find a way to reproduce any ServiceConfigurationError.
Without a proper reproducer, I suggest not merging this change to avoid adding potentially useless code.

@mshabarov mshabarov closed this May 22, 2026
@github-project-automation github-project-automation Bot moved this from 🔎Iteration reviews to Done in Vaadin Flow | Hilla | Kits ongoing work May 22, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Development

Successfully merging this pull request may close these issues.

2 participants