Skip to content

JacksonException emited from SchemaRegistry. getSchema() on invalid json #1243

@afiluba

Description

@afiluba

After update to jackson3

SchemaRegistry.getSchema()

method was not updated to catch JacksonException and still catches IOException.

When passing invalid json to this method JacksonException is emitted. In version 2.x it was converted to SchemaException.

I prepared an example PR that fixes this issue. I did not want to change api contract in Schema.validate() methods, they returned UncheckedIOException for jackson thrown IOException.
This leads to somehow ugly construction:

} catch (JacksonException e) {
   throw new UncheckedIOException(new IOException("Invalid input", e));
}

Please let me know if You would prefer to loosen that backward compatiblity and then I can simple let the Jackson exception be thrown. (but that could lead to incompatiblity similiar to mine for other people).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions