mirror of
https://github.com/hcengineering/platform.git
synced 2025-06-09 09:20:54 +00:00
Do not retry for some kind of errors in Github
Signed-off-by: Andrey Sobolev <haiodo@gmail.com>
This commit is contained in:
parent
02c6fe829b
commit
a76895e60d
@ -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()
|
||||
|
Loading…
Reference in New Issue
Block a user