We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 98cbdd0 commit 3b28aa6Copy full SHA for 3b28aa6
packages/client/lib/client/index.spec.ts
@@ -295,6 +295,7 @@ describe('Client', () => {
295
assert.equal(err.replies.length, 2);
296
assert.deepEqual(err.errorIndexes, [1]);
297
assert.ok(err.replies[1] instanceof ErrorReply);
298
+ assert.deepEqual([...err.errors()], [err.replies[1]]);
299
return true;
300
}
301
);
packages/client/lib/errors.ts
@@ -79,4 +79,10 @@ export class MultiErrorReply extends ErrorReply {
79
this.replies = replies;
80
this.errorIndexes = errorIndexes;
81
82
+
83
+ *errors() {
84
+ for (const index of this.errorIndexes) {
85
+ yield this.replies[index];
86
+ }
87
88
0 commit comments