Challenge: Set status to 'idle' on rate limit errors

This commit is contained in:
Scott Nonnenberg 2024-05-24 02:23:05 +10:00 committed by GitHub
parent 8a9ab8c13f
commit 8391a71aff
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -400,7 +400,11 @@ export class ChallengeHandler {
`challenge(${reason}): challenge failure, error:`,
Errors.toLogFormat(error)
);
this.options.setChallengeStatus('required');
if (error.code === 413 || error.code === 429) {
this.options.setChallengeStatus('idle');
} else {
this.options.setChallengeStatus('required');
}
this.solving -= 1;
return;
}