Skip to content

Commit

Permalink
Merge pull request #2701 from davidfiala/patch-1
Browse files Browse the repository at this point in the history
Resolve exception when Error.stackTraceLimit is undefined
  • Loading branch information
murgatroid99 authored Apr 1, 2024
2 parents 77dca7a + 2099f54 commit 74e4da5
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 74e4da5

Please sign in to comment.