Skip to content

Commit d04dd37

Browse files
authored
add errors iterator helper
1 parent f3b3fe5 commit d04dd37

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

packages/client/lib/errors.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,4 +75,10 @@ export class MultiErrorReply extends ErrorReply {
7575
this.replies = replies;
7676
this.errorIndexes = errorIndexes;
7777
}
78+
79+
*errors() {
80+
for (const index of this.errorIndexes) {
81+
yield this.replies[index];
82+
}
83+
}
7884
}

0 commit comments

Comments
 (0)