Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: trigger reconnection on INTERNAL status error #435

Merged
merged 4 commits into from
Apr 10, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions src/managedwriter/stream_connection.ts
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,7 @@ export class StreamConnection extends EventEmitter {
gax.Status.ABORTED,
gax.Status.CANCELLED,
gax.Status.DEADLINE_EXCEEDED,
gax.Status.INTERNAL,
];
return !!err.code && reconnectionErrorCodes.includes(err.code);
}
Expand Down
4 changes: 4 additions & 0 deletions system-test/managed_writer_client_test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1149,6 +1149,10 @@ describe('managedwriter.WriterClient', () => {
code: gax.Status.DEADLINE_EXCEEDED,
msg: 'a msg',
},
{
code: gax.Status.INTERNAL,
msg: 'received RST_STREAM with code',
},
].map(err => {
const gerr = new gax.GoogleError(err.msg);
gerr.code = err.code;
Expand Down
Loading