Skip to content

Commit

Permalink
[SDCISA-13736] We're not allowed to pass any more error details to th…
Browse files Browse the repository at this point in the history
…at KISS handler. Have to fallback to log-only.
  • Loading branch information
hiddenalpha committed Jan 3, 2024
1 parent c20698d commit 2e486a8
Showing 1 changed file with 6 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,10 @@ public RestStorageHandler(Vertx vertx, final Logger log, final Storage storage,

Result<Boolean, String> result = checkHttpAuthenticationConfiguration(config);
if(result.isErr()) {
router.route().handler(ctx -> respondWith(ctx.response(), StatusCode.INTERNAL_SERVER_ERROR, "ERR_hXECANxwAgCUQIAK: " + result.getErr()));
router.route().handler(ctx -> {
log.warn("router.route()", new Exception(result.getErr()));
respondWith(ctx.response(), StatusCode.INTERNAL_SERVER_ERROR, result.getErr());
});
} else if (result.getOk()) {
AuthenticationProvider authProvider = new ModuleConfigurationAuthentication(config);
router.route().handler(BasicAuthHandler.create(authProvider));
Expand Down Expand Up @@ -602,8 +605,8 @@ private void storageExpand(RoutingContext ctx) {
}
ResourceNameUtil.replaceColonsAndSemiColonsInList(subResourceNames);
} catch (RuntimeException ex) {
log.warn("Happy stacktrace just for you", ex);
respondWithBadRequest(ctx.request(), "Bad Request: Unable to parse body of storageExpand POST request: "+ ex.getMessage());
log.warn("KISS handler is not interested in error details. I'll report them here then.", ex);
respondWithBadRequest(ctx.request(), "Bad Request: Unable to parse body of storageExpand POST request");
return;
}

Expand Down

0 comments on commit 2e486a8

Please sign in to comment.