mirror of
https://github.com/signalapp/Signal-Desktop.git
synced 2025-12-24 20:26:24 +00:00
Fix error propagation for attachment streams
This commit is contained in:
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user