Skip to content

Commit

Permalink
Remove unnecessary catch
Browse files Browse the repository at this point in the history
  • Loading branch information
onurtemizkan committed Jan 10, 2025
1 parent 7b95248 commit 687c821
Showing 1 changed file with 0 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -269,14 +269,6 @@ export class ExpressInstrumentation extends InstrumentationBase<ExpressInstrumen

try {
return callback.apply(this, arguments);
} catch (anyError) {
const [error, message] = asErrorAndMessage(anyError);
span.recordException(error);
span.setStatus({
code: SpanStatusCode.ERROR,
message,
});
throw anyError;
} finally {
if (!spanHasEnded) {
spanHasEnded = true;
Expand Down

0 comments on commit 687c821

Please sign in to comment.