This is an automated email from the ASF dual-hosted git repository.

technoboy pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/pulsar.git


The following commit(s) were added to refs/heads/master by this push:
     new cefa72c7d18 [improve][schema] Improve Incompatible Schema Exception 
error message in ServerCnx.java (#23344)
cefa72c7d18 is described below

commit cefa72c7d18ab05d413e8737672f746629874f59
Author: maheshnikam <[email protected]>
AuthorDate: Wed Sep 25 20:15:12 2024 +0530

    [improve][schema] Improve Incompatible Schema Exception error message in 
ServerCnx.java (#23344)
---
 .../src/main/java/org/apache/pulsar/broker/service/ServerCnx.java    | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git 
a/pulsar-broker/src/main/java/org/apache/pulsar/broker/service/ServerCnx.java 
b/pulsar-broker/src/main/java/org/apache/pulsar/broker/service/ServerCnx.java
index 7d196ad3023..5b67b01115e 100644
--- 
a/pulsar-broker/src/main/java/org/apache/pulsar/broker/service/ServerCnx.java
+++ 
b/pulsar-broker/src/main/java/org/apache/pulsar/broker/service/ServerCnx.java
@@ -3052,7 +3052,8 @@ public class ServerCnx extends PulsarHandler implements 
TransportCnx {
                 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);
                 }
@@ -3727,4 +3728,4 @@ public class ServerCnx extends PulsarHandler implements 
TransportCnx {
     public void decrementThrottleCount() {
         throttleTracker.decrementThrottleCount();
     }
-}
\ No newline at end of file
+}

Reply via email to