Skip to content

Prevent unhandled rejections in writeGuestFile and deleteGuestFile, as in readGuestFileStream - #136

Open
maxhully wants to merge 1 commit into
earendil-works:mainfrom
maxhully:max/catch-done-more
Open

Prevent unhandled rejections in writeGuestFile and deleteGuestFile, as in readGuestFileStream#136
maxhully wants to merge 1 commit into
earendil-works:mainfrom
maxhully:max/catch-done-more

Conversation

@maxhully

@maxhully maxhully commented Jul 23, 2026

Copy link
Copy Markdown

In host/src/sandbox/server-ops.ts, there is a void done.catch(() => {}); line inside the readGuestFileStream method. This prevents an unhandled rejection from crashing the whole process if the operation fails before done is awaited. (For example, an abort can cause a rejection before we hit await done.)

This PR adds the same handling to writeGuestFile and deleteGuestFile, which have the same problem as readGuestFileStream but don't have the no-op handler to fix it.

(I hit this unhandled rejection when aborting a task running in a Gondolin sandbox.)

Contribution Agreement

Please ensure this PR follows the guidelines in CONTRIBUTING.md. (Author's note: uh... where?)

By submitting this pull request, I confirm the following:

I understand that the entity Earendil Inc. (incorporated in the state of Delaware in 2025) needs some rights from me in order to utilize my contributions in this PR. As a contributor I retain all rights, title and interest in and to my contributions, and by keeping this boilerplate intact I confirm that Earendil Inc. can use, modify, copy, and redistribute my contributions, under Earendil Inc.'s choice of terms.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant