Treat missing JSON paths as expected failures instead of errors#170
Open
Treat missing JSON paths as expected failures instead of errors#170
Conversation
Remove MissingJsonPath exception. Missing JSON paths now raise ExpectedUdfException, which is already filtered from error_infos before serialization. This eliminates noisy error traces for the common case where actions only have a subset of fields. InvalidJsonType still raises for real type mismatches.
Missing paths no longer produce error_infos entries.
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.
Summary
MissingJsonPathexception class fromjson_utils.pyExpectedUdfExceptioninstead, which is already filtered fromerror_infosbefore serialization to BigTableMissingJsonPathfrom_is_spammy_exceptionin executor (no longer needed)test_json_datato expect no error_infos for missing paths withrequired=TrueThis eliminates noisy error traces for the common case where actions only have a subset of JSON fields (~498
JsonDatacalls across ~6000 rules).InvalidJsonTypestill raises for real type mismatches.Test plan
test_json_datatests pass with updated assertionsInvalidJsonTypestill raised for real type mismatches