shounakmk219 commented on code in PR #14395: URL: https://github.com/apache/pinot/pull/14395#discussion_r1832015479
########## pinot-controller/src/main/java/org/apache/pinot/controller/api/resources/PinotSchemaRestletResource.java: ########## @@ -430,8 +430,8 @@ private SuccessResponse addSchema(Schema schema, boolean override, boolean force throw new ControllerApplicationException(LOGGER, e.getMessage(), Response.Status.BAD_REQUEST, e); } catch (Exception e) { _controllerMetrics.addMeteredGlobalValue(ControllerMeter.CONTROLLER_SCHEMA_UPLOAD_ERROR, 1L); - throw new ControllerApplicationException(LOGGER, String.format("Failed to add new schema %s.", schemaName), - Response.Status.INTERNAL_SERVER_ERROR, e); + throw new ControllerApplicationException(LOGGER, String.format("Failed to add new schema %s. Reason: %s", Review Comment: > Is there a format that we followed for such error logs? I see this format being followed at other places where a custom message is followed by `Reason: <exception message>` hence extending the same here. >I vote against this messages created with String.format Agree, in this PR I am not touching the existing formatted messages, just adding the reason part where its missing. Cleaning up all the `String.format` can be a separate PR altogether. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@pinot.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@pinot.apache.org For additional commands, e-mail: commits-h...@pinot.apache.org