Don't generate stack traces for rate limit exceptions.

This commit is contained in:
Jon Chambers 2021-05-06 18:11:46 -04:00 committed by Jon Chambers
parent f0a8b5a54a
commit bf32b766a5
2 changed files with 3 additions and 4 deletions

View File

@ -11,12 +11,11 @@ public class RateLimitExceededException extends Exception {
private final Duration retryDuration;
public RateLimitExceededException(final Duration retryDuration) {
super();
this.retryDuration = retryDuration;
this(null, retryDuration);
}
public RateLimitExceededException(final String message, final Duration retryDuration) {
super(message);
super(message, null, true, false);
this.retryDuration = retryDuration;
}

View File

@ -11,7 +11,7 @@ public class RetryLaterException extends Exception {
private final Duration backoffDuration;
public RetryLaterException(RateLimitExceededException e) {
super(e);
super(null, e, true, false);
this.backoffDuration = e.getRetryDuration();
}