From 632e6bc1e8a2775736dcba71cdec96db977b7a97 Mon Sep 17 00:00:00 2001 From: Kalin Krustev Date: Thu, 23 Nov 2023 08:48:17 +0100 Subject: [PATCH] fix: improve error handling --- lib/content/write.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/content/write.js b/lib/content/write.js index 2884dbb..09ca4e4 100644 --- a/lib/content/write.js +++ b/lib/content/write.js @@ -67,7 +67,7 @@ class CacacheWriteStream extends Flush { this.cache, this.opts ) - this.handleContentP.catch(error => this.destroy(error)) + this.handleContentP.catch(error => this.emit('error', error)) } return this.inputStream.write(chunk, encoding, cb) }