From 5119d04243b6375923563de663f61bafe7bef8e7 Mon Sep 17 00:00:00 2001 From: Sosthene Date: Mon, 7 Jul 2025 15:24:15 +0200 Subject: [PATCH] Don't retry commit message for `Not enough members to validate` errors --- src/services/service.ts | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/services/service.ts b/src/services/service.ts index ab220f8..87dfa49 100755 --- a/src/services/service.ts +++ b/src/services/service.ts @@ -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));