Skip to content

Fix client-side exception from Fathom#576

Merged
dergigi merged 1 commit intomasterfrom
fix-client-side-exception
Feb 21, 2026
Merged

Fix client-side exception from Fathom#576
dergigi merged 1 commit intomasterfrom
fix-client-side-exception

Conversation

@dergigi
Copy link
Member

@dergigi dergigi commented Feb 20, 2026

Prevent Fathom from crashing the entire site when ad blockers or privacy tools interfere with the script. Fathom.load() and Fathom.trackPageview() are now wrapped in try/catch so failures log a warning instead of producing an unhandled exception. A React error boundary and a custom error page provide additional safety nets.

  • Wrap Fathom.load() and Fathom.trackPageview() in try/catch in components/Fathom.tsx
  • Add components/ErrorBoundary.tsx and wrap page content in _app.tsx
  • Add pages/_error.tsx as a last-resort fallback for uncaught errors

Wrap Fathom.load() and Fathom.trackPageview() in try/catch so ad
blockers or privacy tools can no longer crash the site. Add a React
ErrorBoundary around page content and a custom _error page as
additional safety nets for any unhandled client-side exceptions.
@vercel
Copy link

vercel bot commented Feb 20, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
os-website Ready Ready Preview, Comment Feb 20, 2026 10:12pm

Request Review

@dergigi dergigi changed the title Fix client-side exception from Fathom analytics Fix client-side exception from Fathom Feb 20, 2026
@dergigi dergigi requested a review from Arvin21M February 20, 2026 22:12
@dergigi dergigi self-assigned this Feb 20, 2026
@dergigi
Copy link
Member Author

dergigi commented Feb 21, 2026

I think I'm gonna go ahead & merge this and in case there's any issues revert.

@dergigi dergigi merged commit 512a44f into master Feb 21, 2026
3 checks passed
@dergigi dergigi deleted the fix-client-side-exception branch February 21, 2026 06:21
Copy link
Contributor

@Arvin21M Arvin21M left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • No problems found by adding try/catch.
  • This merge should resolve the issue of site crashing if ad blockers exist.
  • Dont see a need to revert to fix anything.
  • 🙏

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants