Skip to content

Commit

Permalink
address comments
Browse files Browse the repository at this point in the history
Signed-off-by: Maxwell Brown <[email protected]>
  • Loading branch information
Galactus22625 committed Jan 30, 2025
1 parent ff1dce8 commit 70411df
Showing 1 changed file with 3 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -119,14 +119,10 @@ private <T> ResponseEntity<T> invokeRestApi(URI uri, Class<T> responseType) thro
if (statusCode == HttpStatus.FORBIDDEN) {
throw new UnAuthorizedException(statusMessage);
} else if (statusCode == HttpStatus.UNAUTHORIZED) {
log.error(NOISY, "Token expired. We will try to renew the tokens now.");
log.warn(NOISY, "Token expired. We will try to renew the tokens now.");
authConfig.renewCredentials();
} else if (statusCode == HttpStatus.TOO_MANY_REQUESTS) {
log.error(NOISY, "Hitting API rate limit. Backing off with sleep timer for {} seconds.", RETRY_ATTEMPT_SLEEP_TIME.get(retryCount));
} else if (statusCode == HttpStatus.SERVICE_UNAVAILABLE) {
log.error(NOISY, "Service unavailable. Will retry after backing off with sleep timer for {} seconds.", RETRY_ATTEMPT_SLEEP_TIME.get(retryCount));
} else if (statusCode == HttpStatus.GATEWAY_TIMEOUT) {
log.error(NOISY, "Gateway timeout. Will retry after backing off with sleep timer for {} seconds.", RETRY_ATTEMPT_SLEEP_TIME.get(retryCount));
} else if (statusCode == HttpStatus.TOO_MANY_REQUESTS || statusCode == HttpStatus.SERVICE_UNAVAILABLE || statusCode == HttpStatus.GATEWAY_TIMEOUT) {
log.error(NOISY, "Received {}. Backing off with sleep timer for {} seconds.", statusCode, RETRY_ATTEMPT_SLEEP_TIME.get(retryCount));
} else {
log.error(NOISY, "Received an unexpected status code {} response from Jira.", statusCode, ex);
}
Expand Down

0 comments on commit 70411df

Please sign in to comment.