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

Improve schema validation log output #144

Open
marcvdijk opened this issue Sep 21, 2018 · 0 comments
Open

Improve schema validation log output #144

marcvdijk opened this issue Sep 21, 2018 · 0 comments

Comments

@marcvdijk
Copy link
Member

Currently the output of a JSON schema validation failure is difficult to read for the user because of:

  1. Error always starts with a another error thrown by the logging service that has nothing to do with
    the schema validation error itself and should not even occur adding to the confusion.
    Error starts with:

    Unable to format event {'log_namespace': 'lie_workflow.workflow_runner', 'log_level':
    <LogLevel=error>, 'log_logger': <Logger 'lie_workflow.workflow_runner'>, ....

  2. The error stack trace contains the full Exception output of the schema validation error thrown by
    the "jsonschema" package. That one contains the full input/output of the service and that can
    become quite big resulting in lots of log output making it difficult to pinpoint the problem.

  3. Schema validation exceptions are JSON constructs that are printed "inline" but for human
    readability it is better to "pretty print" them.

I think it would be a good idea to only log the core reason for the validation to fail such as "wrong type" or required parameter X missing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant