From 499481ce6e24a3756e6ca19c464c590a1f07cca9 Mon Sep 17 00:00:00 2001 From: Richard Davison Date: Mon, 7 Feb 2022 18:20:11 +0100 Subject: [PATCH] Add error handling to scan _read --- src/stream.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/stream.ts b/src/stream.ts index 73b901c..075169a 100644 --- a/src/stream.ts +++ b/src/stream.ts @@ -57,7 +57,9 @@ export class ReadItemsCommandReadableStream< } this.finishPush() - }) + }).catch((error) => { + this.destroy(error) + }) } private finishPush() {