Skip to content

Commit 74e4da5

Browse files
authored
Merge pull request #2701 from davidfiala/patch-1
Resolve exception when Error.stackTraceLimit is undefined
2 parents 77dca7a + 2099f54 commit 74e4da5

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Diff for: packages/grpc-js/src/client.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ export type ClientOptions = Partial<ChannelOptions> & {
110110
};
111111

112112
function getErrorStackString(error: Error): string {
113-
return error.stack!.split('\n').slice(1).join('\n');
113+
return error.stack?.split('\n').slice(1).join('\n') || 'no stack trace available';
114114
}
115115

116116
/**

0 commit comments

Comments
 (0)