diff --git a/backend/server.ts b/backend/server.ts index cd5236e..e9de023 100644 --- a/backend/server.ts +++ b/backend/server.ts @@ -387,7 +387,8 @@ app.get('/api/job-file-content', async (c) => { }); if (!res.ok) { const text = await res.text(); - return c.json({ error: `Graph ${res.status}: ${text}` }, res.status); + logLine('logs/error.log', `/api/job-file-content failed: ${res.status} - ${text}`); + return c.json({ error: `Graph ${res.status}: ${text}` }, 502); } const headers: Record = {}; const ct = res.headers.get('content-type'); @@ -419,7 +420,7 @@ app.get('/api/job-file-pdf', async (c) => { if (!res.ok) { const text = await res.text(); logLine('logs/error.log', `/api/job-file-pdf conversion failed: ${res.status} - ${text}`); - return c.json({ error: `PDF conversion failed: ${res.status}` }, res.status); + return c.json({ error: `PDF conversion failed: ${res.status}` }, 502); } const headers: Record = { 'Content-Type': 'application/pdf',