Skip to content

fix(flagd): improve error messages for validation, if there are multiple errors #1250

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

Conversation

aepfli
Copy link
Member

@aepfli aepfli commented Feb 27, 2025

we are currently only returning the first error in the list of our validation violations. this makes debugging and fixing easy. with this pr we are adding more information to the log

 WARN dev.openfeature.contrib.providers.flagd.resolver.process.model.FlagParser - Invalid flag configuration: [$.flags.myBoolFlag: must be valid to one and only one schema, but 0 are valid, $.flags.myBoolFlag: required property 'defaultVariant' not found, $.flags.myBoolFlag: required property 'defaultVariant' not found, $.flags.myBoolFlag: required property 'defaultVariant' not found, $.flags.myBoolFlag: required property 'defaultVariant' not found]

@aepfli aepfli requested a review from a team as a code owner February 27, 2025 10:35
@aepfli aepfli changed the title fix(flagd): improve error messages for validation, if there are multi… fix(flagd): improve error messages for validation, if there are multiple errors Feb 27, 2025
@aepfli aepfli force-pushed the fix/improve-error-message-for-json-validation branch from e7d2cd0 to 1cafa98 Compare February 27, 2025 11:09
@aepfli aepfli force-pushed the fix/improve-error-message-for-json-validation branch from 1cafa98 to 208bfba Compare February 27, 2025 11:17
Copy link
Member

@guidobrei guidobrei left a comment

Choose a reason for hiding this comment

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

LGTM. Thanks for the improvement.

@toddbaert toddbaert merged commit 82ca797 into open-feature:main Feb 27, 2025
6 checks passed
@toddbaert toddbaert deleted the fix/improve-error-message-for-json-validation branch February 27, 2025 19:02
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.

7 participants