Skip to content

Commit 0b7e024

Browse files
authored
ref: Provide originalException in minimal calls as well (#1509)
1 parent d7b629e commit 0b7e024

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

packages/minimal/src/index.ts

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,10 @@ export function captureException(exception: any): string {
2828
} catch (exception) {
2929
syntheticException = exception as Error;
3030
}
31-
return callOnHub('captureException', exception, { syntheticException });
31+
return callOnHub('captureException', exception, {
32+
originalException: exception,
33+
syntheticException,
34+
});
3235
}
3336

3437
/**
@@ -45,7 +48,10 @@ export function captureMessage(message: string, level?: Severity): string {
4548
} catch (exception) {
4649
syntheticException = exception as Error;
4750
}
48-
return callOnHub('captureMessage', message, level, { syntheticException });
51+
return callOnHub('captureMessage', message, level, {
52+
originalException: message,
53+
syntheticException,
54+
});
4955
}
5056

5157
/**

0 commit comments

Comments
 (0)