Skip to content

Commit fc5eb0c

Browse files
authored
Fix #945 Log level for rate-limited error logging (#946)
1 parent 20c8dca commit fc5eb0c

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

slack-api-client/src/main/java/com/slack/api/methods/impl/AsyncRateLimitExecutor.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -188,7 +188,8 @@ private static <T extends SlackApiTextResponse> T handleIOException(String teamI
188188
private static void logSlackApiException(String teamId, String methodName, SlackApiException e) {
189189
if (e.getResponse().code() == 429) {
190190
String retryAfterSeconds = e.getResponse().header("Retry-After");
191-
log.error("Got a rate-limited response from {} API (team: {}, error: {}, retry-after: {})",
191+
// As long as you use this executor, the API client automatically retries the same request for you
192+
log.warn("Got a rate-limited response from {} API (team: {}, error: {}, retry-after: {})",
192193
methodName,
193194
teamId,
194195
e.getMessage(),

0 commit comments

Comments
 (0)