Skip to content

Accessing the source data in TypeGuardError #57

@dko-slapdash

Description

@dko-slapdash

TypeGuardError forms a nice error message, but the data which failed validation is not part of this error. I.e. I can catch & print "TypeGuardError: validation failed at ...", but I can't print "TypeGuardError: validation failed at ..., input data was: ..." down the stack.

Is it possible to add a field to TypeGuardError which holds the actual data failed validation? This would be super useful for debugging.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions