Skip to content

Commit

Permalink
fix: use res.json
Browse files Browse the repository at this point in the history
  • Loading branch information
Jeday committed Aug 7, 2024
1 parent c756be1 commit f43fb07
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion utilsApi/cached-proxy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit f43fb07

Please sign in to comment.