Warn when giving up on being throttled

This commit is contained in:
gnuxie 2022-07-06 12:15:45 +01:00
parent 01a6e14fb3
commit 998e9cce02

View File

@ -386,6 +386,9 @@ function patchMatrixClientForRetry() {
// We need to retry.
reject(err);
} else {
if (attempt >= MAX_REQUEST_ATTEMPTS) {
LogService.warn('Mjolnir.client', `Retried request ${params.method} ${params.uri} ${attempt} times, giving up.`);
}
// No need-to-retry error? Lucky us!
// Note that this may very well be an error, just not
// one we need to retry.