eugen-keeper commented on code in PR #1058:
URL: https://github.com/apache/guacamole-client/pull/1058#discussion_r1951227013


##########
extensions/guacamole-vault/modules/guacamole-vault-ksm/src/main/java/org/apache/guacamole/vault/ksm/secret/KsmClient.java:
##########
@@ -664,12 +664,28 @@ public Future<String> getSecret(
             return CompletableFuture.completedFuture(null);
         }
 
-        // ... and plain Exceptions for parse failures (no subclasses)
         catch (Exception e) {
-            logger.warn("\"{}\" is not valid Keeper notation. Please check "
+            // The original implementation considered plain exceptions as parse
+            // failures only. In practice you may receive a "record not found"
+            // exception here (no subclasses).
+            String message = e.getMessage();
+            if (message.contains("not found")) {
+                logger.warn("\"{}\" could not be resolved: {}", notation, 
message);
+            }
+            else {
+                logger.warn("\"{}\" may be not valid Keeper notation. Please 
check "
                     + "the documentation at {} for valid formatting.",
                     notation, KEEPER_NOTATION_DOC_URL);

Review Comment:
   Fixed. Correct?



-- 
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: dev-unsubscr...@guacamole.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to