Ganeshsivakumar commented on code in PR #37471:
URL: https://github.com/apache/beam/pull/37471#discussion_r2762577937


##########
sdks/java/ml/inference/remote/src/main/java/org/apache/beam/sdk/ml/inference/remote/RetryHandler.java:
##########
@@ -82,13 +77,12 @@ public <T> T execute(RetryableRequest<T> request) throws 
Exception {
         if (backoffMillis == BackOff.STOP) {
           LOG.error("Request failed after {} retry attempts.", attempt);
           throw new RuntimeException(
-            "Request failed after exhausting retries. " +
-              "Max retries: " + maxRetries + ", " ,
-            lastException);
+              "Request failed after exhausting retries. " + "Max retries: " + 
maxRetries + ", ",
+              lastException);
         }
 
         attempt++;
-        LOG.warn("Retry request attempt {} failed with: {}. Retrying in {} 
ms", attempt, e.getMessage(), backoffMillis);
+        LOG.warn("Retry request attempt {} failed. Retrying in {} ms", 
attempt, backoffMillis, e);

Review Comment:
   This triggers lint error since passing exception is sufficient
   ```
    [Slf4jDoNotLogMessageOfExceptionExplicitly] Do not log message returned 
from Throwable#getMessage and Throwable#getLocalizedMessage. It is enough to 
provide throwable instance as the last argument, then binding will log its 
message.
             LOG.warn(
   ```



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