fix: don't retry when actor is suspended

Signed-off-by: 아르페 <ore@nrma.cc>
This commit is contained in:
아르페 2024-02-12 06:53:19 +09:00 committed by GitHub
parent a59a9dd32e
commit abc62d64ab
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -451,6 +451,8 @@ export class ApInboxService {
} catch (err) { } catch (err) {
if (err instanceof StatusError && !err.isRetryable) { if (err instanceof StatusError && !err.isRetryable) {
return `skip ${err.statusCode}`; return `skip ${err.statusCode}`;
} else if (err.message === 'actor has been suspended') {
return `skip suspended actor`;
} else { } else {
throw err; throw err;
} }
@ -839,6 +841,8 @@ export class ApInboxService {
} catch (err) { } catch (err) {
if (err instanceof StatusError && err.isClientError) { if (err instanceof StatusError && err.isClientError) {
return `skip ${err.statusCode}`; return `skip ${err.statusCode}`;
} else if (err.message === 'actor has been suspended') {
return `skip suspended actor`;
} else { } else {
throw err; throw err;
} }