mirror of
https://github.com/Moepchi/webspeak3.git
synced 2026-12-03 09:52:50 +08:00
Gateway: unreadable store file fails loudly instead of reading as empty (S13)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Hu2cuPLqpuKVfd9wWFFakU
This commit is contained in:
1 parent
eba1e1af92
commit
2b668a7f73
2 files changed
+12
-2
No files matched your search
@@ -431,7 +431,13 @@ const requestHandler = (req: IncomingMessage, res: ServerResponse) => {
|
||||
requestUrl.pathname === "/api/store/themes" ||
|
||||
requestUrl.pathname.startsWith("/api/store/themes/")
|
||||
) {
|
||||
await handleStore(req, res, requestUrl.pathname);
|
||||
await handleStore(req, res, requestUrl.pathname).catch((err) => {
|
||||
console.error("[store] Request failed:", err);
|
||||
if (!res.headersSent) {
|
||||
res.writeHead(500, { "Content-Type": "application/json" });
|
||||
res.end(JSON.stringify({ error: "internal" }));
|
||||
}
|
||||
});
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user