mirror of
https://codeberg.org/yeentown/barkey.git
synced 2025-07-07 04:26:58 +00:00
minimize logs from node-fetch FetchErrors
This commit is contained in:
parent
75b85eb165
commit
bcd9f1247e
1 changed files with 2 additions and 2 deletions
|
@ -6,7 +6,7 @@
|
|||
import { Inject, Injectable, OnApplicationShutdown } from '@nestjs/common';
|
||||
import * as Bull from 'bullmq';
|
||||
import * as Sentry from '@sentry/node';
|
||||
import { AbortError } from 'node-fetch';
|
||||
import { AbortError, FetchError } from 'node-fetch';
|
||||
import type { Config } from '@/config.js';
|
||||
import { DI } from '@/di-symbols.js';
|
||||
import type Logger from '@/logger.js';
|
||||
|
@ -141,7 +141,7 @@ export class QueueProcessorService implements OnApplicationShutdown {
|
|||
// 何故かeがundefinedで来ることがある
|
||||
if (!e) return '?';
|
||||
|
||||
if (e instanceof Bull.UnrecoverableError || e instanceof AbortError || e.name === 'AbortError' || e instanceof StatusError || e instanceof IdentifiableError) {
|
||||
if (e instanceof Bull.UnrecoverableError || e instanceof AbortError || e.name === 'AbortError' || e instanceof FetchError || e.name === 'FetchError' || e instanceof StatusError || e instanceof IdentifiableError || e instanceof FetchError) {
|
||||
return renderInlineError(e);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue