summaryrefslogtreecommitdiff
path: root/packages/backend/src/queue/processors/InboxProcessorService.ts
diff options
context:
space:
mode:
authorHazelnoot <acomputerdog@gmail.com>2025-03-03 01:03:21 -0500
committerHazelnoot <acomputerdog@gmail.com>2025-06-06 22:19:50 -0400
commit61d0aeba2ec3590ddea08987b1f834e0d79e9fa0 (patch)
tree4ff8c2e94c2087ccb18b93730070ffeada156cc5 /packages/backend/src/queue/processors/InboxProcessorService.ts
parentimprove retryable error detection in ApPersonService.ts (diff)
downloadsharkey-61d0aeba2ec3590ddea08987b1f834e0d79e9fa0.tar.gz
sharkey-61d0aeba2ec3590ddea08987b1f834e0d79e9fa0.tar.bz2
sharkey-61d0aeba2ec3590ddea08987b1f834e0d79e9fa0.zip
add renderInlineError to serialize errors in a consistent way
Diffstat (limited to 'packages/backend/src/queue/processors/InboxProcessorService.ts')
-rw-r--r--packages/backend/src/queue/processors/InboxProcessorService.ts19
1 files changed, 2 insertions, 17 deletions
diff --git a/packages/backend/src/queue/processors/InboxProcessorService.ts b/packages/backend/src/queue/processors/InboxProcessorService.ts
index 93d0a08003..a069d390db 100644
--- a/packages/backend/src/queue/processors/InboxProcessorService.ts
+++ b/packages/backend/src/queue/processors/InboxProcessorService.ts
@@ -32,6 +32,7 @@ import type { Config } from '@/config.js';
import { ApLogService, calculateDurationSince } from '@/core/ApLogService.js';
import { UpdateInstanceQueue } from '@/core/UpdateInstanceQueue.js';
import { isRetryableError } from '@/misc/is-retryable-error.js';
+import { renderInlineError } from '@/misc/render-inline-error.js';
import { QueueLoggerService } from '../QueueLoggerService.js';
import type { InboxJobData } from '../types.js';
@@ -300,24 +301,8 @@ export class InboxProcessorService implements OnApplicationShutdown {
}
}
- if (e instanceof StatusError && !e.isRetryable) {
- return `skip: permanent error ${e.statusCode}`;
- }
-
- if (e instanceof IdentifiableError && !e.isRetryable) {
- if (e.message) {
- return `skip: permanent error ${e.id}: ${e.message}`;
- } else {
- return `skip: permanent error ${e.id}`;
- }
- }
-
if (!isRetryableError(e)) {
- if (e instanceof Error) {
- return `skip: permanent error ${e.name}: ${e.message}`;
- } else {
- return `skip: permanent error ${e}`;
- }
+ return `skip: permanent error ${renderInlineError(e)}`;
}
throw e;