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:
+4
-1
@@ -98,7 +98,10 @@ router_.all('/_web/*', async (ctx) => {
|
|||||||
redirect: 'manual',
|
redirect: 'manual',
|
||||||
});
|
});
|
||||||
return new Response(upstream.body, { status: upstream.status, headers: upstream.headers });
|
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);
|
return ctx.text('gitea unreachable', 502);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user