Skip to content

Commit b1aad22

Browse files
committed
always set message
1 parent 80a699d commit b1aad22

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

packages/opentelemetry-node/src/spanprocessor.ts

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -130,10 +130,7 @@ export class SentrySpanProcessor implements OtelSpanProcessor {
130130
}
131131

132132
const message = attributes[SemanticAttributes.EXCEPTION_MESSAGE];
133-
if (!isString(message)) {
134-
return;
135-
}
136-
const syntheticError = new Error(message);
133+
const syntheticError = new Error(message as string | undefined);
137134

138135
const stack = attributes[SemanticAttributes.EXCEPTION_STACKTRACE];
139136
if (isString(stack)) {

0 commit comments

Comments
 (0)