From a76895e60d116b9010144d245ee67c4e58358e24 Mon Sep 17 00:00:00 2001 From: Andrey Sobolev Date: Thu, 22 May 2025 01:41:10 +0700 Subject: [PATCH] Do not retry for some kind of errors in Github Signed-off-by: Andrey Sobolev --- services/github/pod-github/src/worker.ts | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/services/github/pod-github/src/worker.ts b/services/github/pod-github/src/worker.ts index 4482cd4a65..0fe64ce776 100644 --- a/services/github/pod-github/src/worker.ts +++ b/services/github/pod-github/src/worker.ts @@ -1606,6 +1606,18 @@ export class GithubWorker implements IntegrationManager { } const ops = derivedClient.apply() for (const d of withError) { + const errStr = JSON.stringify(d.error) + if ( + errStr.includes('Bad credentials') || + errStr.includes('Resource not accessible by integration') || + errStr.includes('does not have permission to update') || + errStr.includes('State cannot be changed') || + errStr.includes('Not Found') || + errStr.includes('Body is too long, Body is too long') + ) { + // Skip this error's and not retry + continue + } await ops.update(d, { error: null, needSync: '' }) } await ops.commit()