log why the frame fetch failed

'gitea unreachable' on its own is not a diagnosis. The sidecar was answering
200 to a direct curl while the panel showed that message, which sent the search
to the wrong half of the system twice.
This commit is contained in:
officer
2026-08-19 09:09:07 +00:00
parent 80b9cd02e7
commit e3f673ecb9
+4 -1
View File
@@ -98,7 +98,10 @@ router_.all('/_web/*', async (ctx) => {
redirect: 'manual',
});
return new Response(upstream.body, { status: upstream.status, headers: upstream.headers });
} catch {
} catch (err) {
// Logged, not swallowed. "unreachable" on its own sent two people to the wrong half of the system:
// the sidecar was answering 200 to a direct curl the whole time, and the failure was here.
console.error(`[gitea] frame ${method} ${subpath} -> ${sidecar} failed:`, err);
return ctx.text('gitea unreachable', 502);
}
});