Skip to content

Commit ac897fa

Browse files
committed
fix: set the span status to internal error
1 parent 70cbbaa commit ac897fa

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

packages/nuxt/src/runtime/hooks/wrapMiddlewareHandler.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ import {
88
SEMANTIC_ATTRIBUTE_SENTRY_OP,
99
SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN,
1010
SEMANTIC_ATTRIBUTE_SENTRY_SOURCE,
11+
SPAN_STATUS_ERROR,
1112
SPAN_STATUS_OK,
1213
startSpan,
1314
} from '@sentry/core';
@@ -111,6 +112,7 @@ function withSpan<TResult>(
111112

112113
return result;
113114
} catch (error) {
115+
span.setStatus({ code: SPAN_STATUS_ERROR, message: 'internal_error' });
114116
captureException(error, {
115117
mechanism: {
116118
handled: false,

0 commit comments

Comments
 (0)