Skip to content

Commit 06ff525

Browse files
authored
Merge pull request #2705 from murgatroid99/grpc-js_stacktrace_fix_backport
Backport #2701: Resolve exception when Error.stackTraceLimit is undefined
2 parents 729a3f5 + 213230c commit 06ff525

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

packages/grpc-js/src/client.ts

Lines changed: 1 addition & 1 deletion
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)