mirror of
https://github.com/snapotter-hq/SnapOtter.git
synced 2026-08-03 07:46:42 +02:00
fix: resolve 6 production Sentry errors
- Prevent @fastify/static double-registration crash via decorateReply guard - Fix non-ASCII filename header encoding (X-Output-Filename + RFC 5987 Content-Disposition) - Add EACCES error handling to all startup mkdir calls with actionable messages - Add WAL autocheckpoint and journal size limit to prevent unbounded SQLite growth - Fix Python sidecar EPIPE handling to reject pending requests and trigger restart - Ensure Docker entrypoint creates all subdirectories before chown
This commit is contained in:
@@ -153,7 +153,20 @@ function startDispatcher(): ChildProcess | null {
|
||||
env: buildMinimalEnv(),
|
||||
});
|
||||
|
||||
child.stdin?.on("error", () => {});
|
||||
child.stdin?.on("error", (err: NodeJS.ErrnoException) => {
|
||||
if (err.code === "EPIPE" || err.code === "ERR_STREAM_DESTROYED") {
|
||||
console.error(
|
||||
`[bridge] Dispatcher stdin pipe broken (${err.code}), rejecting pending requests`,
|
||||
);
|
||||
for (const [id, req] of pendingRequests.entries()) {
|
||||
req.reject(new Error("Python dispatcher stdin closed unexpectedly"));
|
||||
pendingRequests.delete(id);
|
||||
}
|
||||
recordCrash();
|
||||
dispatcher = null;
|
||||
dispatcherReady = false;
|
||||
}
|
||||
});
|
||||
|
||||
let stderrBuffer = "";
|
||||
|
||||
|
||||
Reference in New Issue
Block a user