pulsar icon indicating copy to clipboard operation
pulsar copied to clipboard

[improve][broker] Improve exception for topic does not have schema to check

Open shibd opened this issue 1 year ago • 0 comments

Motivation

If a consumer use schema to connector a active topic with empty(or bytes) schema, will receive IncompatibleSchemaException: Topic does not have schema to check

But, This exception message may confuse for users.

Modifications

  • Change exception msg to: Failed to add schema to an active topic with empty(BYTES) schema: new schema type schema.getType()

Verifying this change

  • testAutoProduceAndSpecifiedConsumer will cover it.

Documentation

  • [ ] doc
  • [ ] doc-required
  • [x] doc-not-needed
  • [ ] doc-complete

Matching PR in forked repository

PR in forked repository:

shibd avatar Jun 25 '24 07:06 shibd