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

Config processing with lazy error handling #127

Merged
merged 3 commits into from
Jun 10, 2024

Conversation

luk-kaminski
Copy link
Contributor

@luk-kaminski luk-kaminski commented Mar 27, 2024

Fixes #126

Notes for Reviewers

  • The commit history must be preserved - please use the rebase-merge or standard merge option instead of squash-merge
  • Sync up with the author before merging

@luk-kaminski luk-kaminski requested a review from todvora March 27, 2024 11:51
@todvora
Copy link
Contributor

todvora commented Apr 19, 2024

I have adapted the behaviour to match the eager processing mode. The lazy method now doesn't return any result, the return type is void. The outcome of the processing is either configured beans or a ValidationException, aggregating all the errors and providing access to the underlying ProcessingResponse, if the caller wants to handle the errors in a specific way.

This is how the exception looks now, aggregating three missing properties:

image

The only change from the caller perspective is to switch from jadConfig.process() to jadConfig.processFailingLazily(). Everything else can stay as it is, with the same error handling in place as before.

image

@todvora todvora requested a review from bernd June 6, 2024 10:18
@bernd bernd merged commit 757eb6d into main Jun 10, 2024
4 checks passed
@bernd bernd deleted the feature/config_processing_with_lazy_error_handling branch June 10, 2024 07:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Collect all validation errors and then fail
3 participants