Ismael Juma created KAFKA-3426: ---------------------------------- Summary: Improve protocol type errors when invalid sizes are received Key: KAFKA-3426 URL: https://issues.apache.org/jira/browse/KAFKA-3426 Project: Kafka Issue Type: Improvement Reporter: Ismael Juma Assignee: Ismael Juma
We currently don't perform much validation on the size value read by the protocol types. This means that we end up throwing exceptions like `BufferUnderflowException`, `NegativeArraySizeException`, etc. `Schema.read` catches these exceptions and adds some useful information like: {code} throw new SchemaException("Error reading field '" + fields[i].name + "': " + (e.getMessage() == null ? e.getClass().getName() : e.getMessage())); {code} We could do even better by throwing a `SchemaException` with a more user friendly message. -- This message was sent by Atlassian JIRA (v6.3.4#6332)