Skip to content

Commit

Permalink
Merge pull request #2705 from murgatroid99/grpc-js_stacktrace_fix_bac…
Browse files Browse the repository at this point in the history
…kport

Backport #2701: Resolve exception when Error.stackTraceLimit is undefined
  • Loading branch information
murgatroid99 authored Apr 1, 2024
2 parents 729a3f5 + 213230c commit 06ff525
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/grpc-js/src/client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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';
}

/**
Expand Down

0 comments on commit 06ff525

Please sign in to comment.