nevzheng commented on code in PR #13057:
URL: https://github.com/apache/gravitino/pull/13057#discussion_r3997785800


##########
server-common/src/main/java/org/apache/gravitino/server/web/JettyServerConfig.java:
##########
@@ -112,6 +112,17 @@ public final class JettyServerConfig {
           .checkValue(value -> value > 0, 
ConfigConstants.POSITIVE_NUMBER_ERROR_MSG)
           .createWithDefault(128 * 1024);
 
+  public static final ConfigEntry<Boolean> INCLUDE_ERROR_STACK_TRACE =
+      new ConfigBuilder("includeErrorStackTrace")
+          .doc(
+              "Whether to include server-side stack traces in HTTP error 
responses. Set this to "
+                  + "false in new deployments because stack traces can expose 
internal "
+                  + "implementation details. It remains true by default only 
to avoid breaking "
+                  + "legacy clients that expect the stack field")
+          .version(ConfigConstants.VERSION_2_0_0)
+          .booleanConf()
+          .createWithDefault(true);

Review Comment:
   Per https://github.com/apache/gravitino/pull/13057#discussion_r3976636024, 
the default stays `true` for compatibility with clients that read the `stack` 
field. Operators opt out with 
`gravitino.server.webserver.includeErrorStackTrace=false`, which the server 
config docs recommend for new deployments.



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to