From f43fb073c71e11083bf3c4177be226392acac256 Mon Sep 17 00:00:00 2001 From: Evgeny Taktarov Date: Wed, 7 Aug 2024 21:20:22 +0700 Subject: [PATCH] fix: use res.json --- utilsApi/cached-proxy.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/utilsApi/cached-proxy.ts b/utilsApi/cached-proxy.ts index 6e1f5367c..5710baa8c 100644 --- a/utilsApi/cached-proxy.ts +++ b/utilsApi/cached-proxy.ts @@ -68,7 +68,7 @@ export const createCachedProxy = ({ if (e instanceof FetcherError && e.status >= 400 && e.status < 500) { console.warn(`[CachedProxy]Forwarding ${e.status} error from ${url}`); res.status(e.status); - res.send({ error: e.message }); + res.json({ error: e.message }); return; } console.warn(`[CachedProxy] Failed to proxy from ${url}`, e);