Skip to content

Commit 9810941

Browse files
authored
fix: trigger reconnection on INTERNAL status error (#435)
1 parent a833672 commit 9810941

2 files changed

Lines changed: 5 additions & 0 deletions

File tree

handwritten/bigquery-storage/src/managedwriter/stream_connection.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -139,6 +139,7 @@ export class StreamConnection extends EventEmitter {
139139
gax.Status.ABORTED,
140140
gax.Status.CANCELLED,
141141
gax.Status.DEADLINE_EXCEEDED,
142+
gax.Status.INTERNAL,
142143
];
143144
return !!err.code && reconnectionErrorCodes.includes(err.code);
144145
}

handwritten/bigquery-storage/system-test/managed_writer_client_test.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1149,6 +1149,10 @@ describe('managedwriter.WriterClient', () => {
11491149
code: gax.Status.DEADLINE_EXCEEDED,
11501150
msg: 'a msg',
11511151
},
1152+
{
1153+
code: gax.Status.INTERNAL,
1154+
msg: 'received RST_STREAM with code',
1155+
},
11521156
].map(err => {
11531157
const gerr = new gax.GoogleError(err.msg);
11541158
gerr.code = err.code;

0 commit comments

Comments
 (0)