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


##########
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:
   The linked issue #12728 explicitly requires that stack traces be omitted 
from error responses **by default**, but this config entry currently defaults 
to `true`, which keeps stack traces exposed unless operators opt out. If 
upstream policy is to meet the issue’s acceptance criteria, the default should 
be `false` (and legacy behavior re-enabled only when explicitly configured).



-- 
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