Closed stoetti closed 4 years ago
@stoetti: Thank you for reporting! It makes sense to propagate sufficient information about the problem when it occurs. If the root of the exception is handled inappropriately (or swallowed silently), we will have to fix that.
Hi @stoetti , would you happen to have an invalid schema sample that reproduces the above explained behavior?
Hi @stoetti , would you happen to have an invalid schema sample that reproduces the above explained behavior?
Sure
{
"type": "record",
"name": "SuperType",
"namespace": "some.namespace",
"fields": [
{
"name": "field",
"type": "SomeType"
}
]
}
If a schema definition (format avro) is invalid the Schema-Parser throws an Exception containing the invalid part of the definition. This information is not propagated or logged by AvroSchemaValidator. On the client-side the only information that is received is "Bad Request" with the information that the definition is invalid.
In my opinion the response message should contain the message of the SchemaParseException thrown by the parser. This makes it much easier for the client to find the issue of his bad request.