Skip to content
This repository was archived by the owner on Mar 26, 2026. It is now read-only.

Commit 8cc1e61

Browse files
committed
fix: catch undefined requestStreams from client closed errors
1 parent 96ac539 commit 8cc1e61

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

src/tabular-api-surface.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -476,6 +476,11 @@ Please use the format 'prezzy' or '${instance.name}/tables/prezzy'.`);
476476
reqOpts,
477477
gaxOpts: Object.assign({}, gaxOptions),
478478
});
479+
if (!requestStream) {
480+
throw new Error(
481+
'Failed to create request stream -- is the client already closed?',
482+
);
483+
}
479484
metricsCollector.wrapRequest(requestStream);
480485
const stream = pumpify.obj([requestStream, rowKeysStream]);
481486
stream.on('end', () => {

0 commit comments

Comments
 (0)