You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit abe134a
Browse filesBrowse the repository at this point in the historyBrowse files
fix(files): refuse unrendered bytes at the download boundary
Addresses the second review round.
- Throw UnrenderableDocumentError from downloadServableFileFromStorage instead
of returning bytes with an `unrendered` flag. Around 45 call sites (email
attachments, cloud uploads, zip entries, provider attachments) receive only a
Buffer and re-infer the type from the filename, so a flag they must remember
to check is a flag they will not check. Those callers already handled the
previous not-ready throw, so failing is the shape they expect. The file-serve
route is unaffected — it resolves bytes directly and keeps the graceful
passthrough, where a human downloading the file has a use for it.
- Surface that failure through hydration: with throwOnDocNotReady set, the
caller cannot use a file with no content, so an unrenderable document now
reaches it verbatim instead of degrading to null and reporting a misleading
"may exceed size limit or no longer accessible".
- Stop a shared render inheriting one caller's cancellation. The coalesced run
no longer carries any caller's signal; each caller races its own instead, so
an aborting reader gives up promptly while the render finishes for the others
and still lands in the cache.
0 commit comments