Fix error propagation for attachment streams
Co-authored-by: Fedor Indutny <79877362+indutny-signal@users.noreply.github.com>
This commit is contained in:
parent
0d20e52128
commit
3f373b48e6
1 changed files with 2 additions and 2 deletions
|
@ -351,7 +351,7 @@ export async function handleAttachmentRequest(req: Request): Promise<Response> {
|
|||
plaintext
|
||||
);
|
||||
} catch (error) {
|
||||
plaintext.emit('error', error);
|
||||
plaintext.destroy(error);
|
||||
|
||||
// These errors happen when canceling fetch from `attachment://` urls,
|
||||
// ignore them to avoid noise in the logs.
|
||||
|
@ -469,7 +469,7 @@ function handleRangeRequest({
|
|||
try {
|
||||
await pipeline(plaintext, transform);
|
||||
} catch (error) {
|
||||
transform.emit('error', error);
|
||||
transform.destroy(error);
|
||||
|
||||
// These errors happen when canceling fetch from `attachment://` urls,
|
||||
// ignore them to avoid noise in the logs.
|
||||
|
|
Loading…
Reference in a new issue