Don't retry commit message for Not enough members to validate errors

This commit is contained in:
Sosthene 2025-07-07 15:24:15 +02:00
parent 5a8c31df32
commit 5119d04243

View File

@ -1318,9 +1318,12 @@ export default class Services {
const content = JSON.parse(response);
const error = content.error;
const errorMsg = error['GenericError'];
if (errorMsg === 'State is identical to the previous state') {
return;
} else if (errorMsg === 'Not enough valid proofs') { return; }
const dontRetry = [
'State is identical to the previous state',
'Not enough valid proofs',
'Not enough members to validate',
];
if (dontRetry.includes(errorMsg)) { return; }
// Wait and retry
setTimeout(async () => {
await this.sendCommitMessage(JSON.stringify(content));