Skip to content

Commit

Permalink
[improve][schema] Improve Incompatible Schema Exception error message…
Browse files Browse the repository at this point in the history
… in ServerCnx.java (apache#23344)
  • Loading branch information
nikam14 authored Sep 25, 2024
1 parent 5ea4252 commit cefa72c
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3052,7 +3052,8 @@ private CompletableFuture<SchemaVersion> tryAddSchema(Topic topic, SchemaData sc
CompletableFuture<SchemaVersion> result = new CompletableFuture<>();
if (hasSchema && (schemaValidationEnforced || topic.getSchemaValidationEnforced())) {
result.completeExceptionally(new IncompatibleSchemaException(
"Producers cannot connect or send message without a schema to topics with a schema"));
"Producers cannot connect or send message without a schema to topics with a schema"
+ "when SchemaValidationEnforced is enabled"));
} else {
result.complete(SchemaVersion.Empty);
}
Expand Down Expand Up @@ -3727,4 +3728,4 @@ public void incrementThrottleCount() {
public void decrementThrottleCount() {
throttleTracker.decrementThrottleCount();
}
}
}

0 comments on commit cefa72c

Please sign in to comment.