<#2516 feat: Log all JSON schema validation errors...
# meltano-repo-activity
g
#2516 feat: Log all JSON schema validation errors in sinks/targets Issue created by edgarrmondragon Feature scope Taps (catalog, state, stream maps, tests, etc.) Description The default JSON schema validation implementation uses the `.validate()`1 method. This means that only one schema validation failure is logged to the user: sdk/singer_sdk/sinks/core.py Lines 120 to 123 in</meltano/sdk/commit/6638a908736d42887178f5645b913b9ec3aa662d|6638a90> | try: | | --------------------------------------------- | | self.validator.validate(record) | | except jsonschema.ValidationError as e: | | raise InvalidRecord(e.message, record) from e | It might be helpful to instead display all validation errors, and we could use the
.iter_errors()
method for that, raising an appropriate
InvalidRecord
exception. Footnotes 1. https://python-jsonschema.readthedocs.io/en/stable/validate/ :leftwards_arrow_with_hook: meltano/sdk