From 7dd6d872e9b55b972bde2cd906cca06c3a627f37 Mon Sep 17 00:00:00 2001 From: tdurieux Date: Wed, 6 May 2026 12:44:07 +0300 Subject: [PATCH] Improve error handling --- src/core/source/GitHubStream.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/core/source/GitHubStream.ts b/src/core/source/GitHubStream.ts index 9aed880..14436fb 100644 --- a/src/core/source/GitHubStream.ts +++ b/src/core/source/GitHubStream.ts @@ -214,7 +214,11 @@ export default class GitHubStream extends GitHubBase { stream2.destroy(wrapped); }); - storage.write(repoId, filePath, stream1, this.type); + // Fire-and-forget: storage.write logs its own failures inside FileSystem + // (`[fs] write failed`). Swallow the rejection here so an upstream error + // (e.g. GitHub 422 on a too-big blob) doesn't surface as an unhandled + // promise rejection and crash the streamer process. + storage.write(repoId, filePath, stream1, this.type).catch(() => {}); return stream2; }