From 79212bbd375705f0fd658dd5b50b47f77d622fb8 Mon Sep 17 00:00:00 2001 From: tamaina Date: Tue, 17 Jan 2023 17:12:41 +0000 Subject: [PATCH] refactor(server): notify url when fetch error --- packages/backend/src/core/HttpRequestService.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/backend/src/core/HttpRequestService.ts b/packages/backend/src/core/HttpRequestService.ts index 8639b5713d..2864ad4405 100644 --- a/packages/backend/src/core/HttpRequestService.ts +++ b/packages/backend/src/core/HttpRequestService.ts @@ -125,7 +125,7 @@ export class UndiciFetcher { ...(options.headers ?? {}), }, }).catch((err) => { - this.logger?.error('fetch error', err); + this.logger?.error(`fetch error to ${typeof url === 'string' ? url : url.href}`, err); throw new StatusError('Resource Unreachable', 500, 'Resource Unreachable'); }); if (!res.ok && !privateOptions.noOkError) {