Skip to content

Commit

Permalink
chore: Improve Error Logging in ErrorFallback (#18386)
Browse files Browse the repository at this point in the history
* chore: Add a stacktrace to error boundary

* chore: Improve Error Logging in ErrorFallback
  • Loading branch information
thisisamir98 authored Nov 26, 2024
1 parent 517e3f4 commit f2c0cf6
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/script/components/ErrorFallback/ErrorFallback.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,9 @@ const logger = getLogger('ErrorFallback');

export const ErrorFallback = ({error, resetErrorBoundary}: FallbackProps) => {
useEffect(() => {
logger.error(error);
const customError = new Error();
logger.error({originalError: error, originalStack: error?.stack, fallbackInvocationStack: customError.stack});

PrimaryModal.show(PrimaryModal.type.CONFIRM, {
preventClose: true,
secondaryAction: {
Expand Down

0 comments on commit f2c0cf6

Please sign in to comment.