Merge pull request #2705 from murgatroid99/grpc-js_stacktrace_fix_backport

Backport #2701: Resolve exception when Error.stackTraceLimit is undefined
This commit is contained in:
Michael Lumish 2024-04-01 15:24:33 -07:00 committed by GitHub
commit 06ff52596d
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 1 additions and 1 deletions

View File

@ -110,7 +110,7 @@ export type ClientOptions = Partial<ChannelOptions> & {
};
function getErrorStackString(error: Error): string {
return error.stack!.split('\n').slice(1).join('\n');
return error.stack?.split('\n').slice(1).join('\n') || 'no stack trace available';
}
/**