pulsar-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From GitBox <...@apache.org>
Subject [GitHub] merlimat commented on a change in pull request #1692: Return an error if schema is incompatible
Date Tue, 01 May 2018 16:46:38 GMT
merlimat commented on a change in pull request #1692: Return an error if schema is incompatible
URL: https://github.com/apache/incubator-pulsar/pull/1692#discussion_r185269433
 
 

 ##########
 File path: pulsar-broker/src/main/java/org/apache/pulsar/broker/admin/v2/SchemasResource.java
 ##########
 @@ -212,7 +215,18 @@ public void postSchema(
                         .build()
                 ).build()
             )
-        );
+        ).exceptionally(error -> {
+            if (error instanceof IncompatibleSchemaException) {
+                response.resume(
+                    Response.status(Response.Status.BAD_REQUEST).build()
 
 Review comment:
   Can we use something more specific than HTTP 400 error? That would help on the client side
to figure out the reason of the error. 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

Mime
View raw message