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

nehapawar pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-pinot.git


The following commit(s) were added to refs/heads/master by this push:
     new 23889f0  Message from exception in Schema add/validate (#5815)
23889f0 is described below

commit 23889f0e008f6bcf906b5b696a3882aca90348d7
Author: Neha Pawar <[email protected]>
AuthorDate: Wed Aug 5 13:57:18 2020 -0700

    Message from exception in Schema add/validate (#5815)
---
 .../api/resources/PinotSchemaRestletResource.java          | 14 ++++++++------
 1 file changed, 8 insertions(+), 6 deletions(-)

diff --git 
a/pinot-controller/src/main/java/org/apache/pinot/controller/api/resources/PinotSchemaRestletResource.java
 
b/pinot-controller/src/main/java/org/apache/pinot/controller/api/resources/PinotSchemaRestletResource.java
index 658121a..f2bf6c0 100644
--- 
a/pinot-controller/src/main/java/org/apache/pinot/controller/api/resources/PinotSchemaRestletResource.java
+++ 
b/pinot-controller/src/main/java/org/apache/pinot/controller/api/resources/PinotSchemaRestletResource.java
@@ -173,8 +173,8 @@ public class PinotSchemaRestletResource {
     try {
       SchemaUtils.validate(schema);
     } catch (Exception e) {
-      throw new ControllerApplicationException(LOGGER, "Invalid schema: " + 
schema.getSchemaName(),
-          Response.Status.BAD_REQUEST, e);
+      throw new ControllerApplicationException(LOGGER,
+          "Invalid schema: " + schema.getSchemaName() + ". Reason: " + 
e.getMessage(), Response.Status.BAD_REQUEST, e);
     }
     return schema.toPrettyJsonString();
   }
@@ -190,8 +190,8 @@ public class PinotSchemaRestletResource {
     try {
       SchemaUtils.validate(schema);
     } catch (Exception e) {
-      throw new ControllerApplicationException(LOGGER, "Invalid schema: " + 
schema.getSchemaName(),
-          Response.Status.BAD_REQUEST, e);
+      throw new ControllerApplicationException(LOGGER,
+          "Invalid schema: " + schema.getSchemaName() + ". Reason: " + 
e.getMessage(), Response.Status.BAD_REQUEST, e);
     }
     return schema.toPrettyJsonString();
   }
@@ -205,7 +205,8 @@ public class PinotSchemaRestletResource {
     try {
       SchemaUtils.validate(schema);
     } catch (Exception e) {
-      throw new ControllerApplicationException(LOGGER, "Cannot add invalid 
schema: " + schema.getSchemaName(),
+      throw new ControllerApplicationException(LOGGER,
+          "Cannot add invalid schema: " + schema.getSchemaName() + ". Reason: 
" + e.getMessage(),
           Response.Status.BAD_REQUEST, e);
     }
 
@@ -235,7 +236,8 @@ public class PinotSchemaRestletResource {
     try {
       SchemaUtils.validate(schema);
     } catch (Exception e) {
-      throw new ControllerApplicationException(LOGGER, "Cannot add invalid 
schema: " + schemaName,
+      throw new ControllerApplicationException(LOGGER,
+          "Cannot add invalid schema: " + schemaName + ". Reason: " + 
e.getMessage(),
           Response.Status.BAD_REQUEST, e);
     }
 


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to