Use range-finder for streaming range requests

This commit is contained in:
Fedor Indutny 2024-07-29 16:23:51 -07:00 committed by GitHub
parent ec0943cdad
commit a795602e19
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 185 additions and 121 deletions

View file

@ -442,7 +442,10 @@ export async function decryptAttachmentV2ToSink(
} catch (error) {
// These errors happen when canceling fetch from `attachment://` urls,
// ignore them to avoid noise in the logs.
if (error.name === 'AbortError') {
if (
error.name === 'AbortError' ||
error.code === 'ERR_STREAM_PREMATURE_CLOSE'
) {
throw error;
}