Skip to content

Commit 73c6791

Browse files
committed
Ensure error.cause is defined
1 parent b85245c commit 73c6791

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

apps/web/src/helpers/captureException.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ export const captureException = (error: Error, tags?: Record<string, any>) => {
66
console.error('Captured exception:', error)
77
}
88

9-
if ('cause' in error) {
9+
if ('cause' in error && error.cause) {
1010
captureException(error.cause as Error, tags)
1111
return
1212
}

0 commit comments

Comments
 (0)