Don't generate stack traces for rate limit exceptions.
This commit is contained in:
parent
f0a8b5a54a
commit
bf32b766a5
|
@ -11,12 +11,11 @@ public class RateLimitExceededException extends Exception {
|
||||||
private final Duration retryDuration;
|
private final Duration retryDuration;
|
||||||
|
|
||||||
public RateLimitExceededException(final Duration retryDuration) {
|
public RateLimitExceededException(final Duration retryDuration) {
|
||||||
super();
|
this(null, retryDuration);
|
||||||
this.retryDuration = retryDuration;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public RateLimitExceededException(final String message, final Duration retryDuration) {
|
public RateLimitExceededException(final String message, final Duration retryDuration) {
|
||||||
super(message);
|
super(message, null, true, false);
|
||||||
this.retryDuration = retryDuration;
|
this.retryDuration = retryDuration;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -11,7 +11,7 @@ public class RetryLaterException extends Exception {
|
||||||
private final Duration backoffDuration;
|
private final Duration backoffDuration;
|
||||||
|
|
||||||
public RetryLaterException(RateLimitExceededException e) {
|
public RetryLaterException(RateLimitExceededException e) {
|
||||||
super(e);
|
super(null, e, true, false);
|
||||||
this.backoffDuration = e.getRetryDuration();
|
this.backoffDuration = e.getRetryDuration();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue