feat(js/frontend): add error tracking#814
Merged
nikitayutanov merged 3 commits intomainfrom Feb 27, 2026
Merged
Conversation
71d255c to
ec2b309
Compare
osipov-mit
approved these changes
Feb 27, 2026
ec2b309 to
2681503
Compare
Contributor
There was a problem hiding this comment.
Pull request overview
Adds Sentry-based error tracking to the frontend, including global initialization, a Sentry-backed error boundary, and explicit exception reporting in key user flows. This integrates with the existing Vite env configuration and deploy pipeline so Sentry can be enabled via VITE_SENTRY_DSN.
Changes:
- Add
@sentry/reactdependency and initialize Sentry (with Replay integration) whenVITE_SENTRY_DSNis present. - Replace the custom React error boundary with Sentry’s
ErrorBoundary. - Capture exceptions in several feature flows (swap, token tracker, faucet, network switching) and wire DSN through Docker/GitHub Actions env.
Reviewed changes
Copilot reviewed 14 out of 15 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| yarn.lock | Locks new Sentry dependency tree. |
| js/frontend/package.json | Adds @sentry/react dependency. |
| js/frontend/src/main.tsx | Initializes Sentry using SENTRY_DSN and enables Replay integration. |
| js/frontend/src/components/layout/error-boundary/error-boundary.tsx | Swaps custom boundary for Sentry ErrorBoundary with a fallback UI. |
| js/frontend/src/features/token-tracker/components/tokens-card/tokens-card.tsx | Reports burn/convert failures to Sentry. |
| js/frontend/src/features/swap/hooks/use-swap-form.ts | Reports swap submission errors to Sentry. |
| js/frontend/src/features/swap/components/relay-tx-button/relay-tx-button.tsx | Reports manual relay failures to Sentry (Vara→Eth path). |
| js/frontend/src/features/swap/components/pay-vara-fee-button/pay-vara-fee-button.tsx | Reports fee payment failures to Sentry. |
| js/frontend/src/features/faucet/components/get-balance-button/get-balance-button.tsx | Reports faucet request + Turnstile verification errors to Sentry. |
| js/frontend/src/context/network-type/provider.tsx | Reports network switch failures to Sentry. |
| js/frontend/src/consts/env.ts | Adds SENTRY_DSN sourced from VITE_SENTRY_DSN. |
| js/frontend/src/consts/index.ts | Re-exports SENTRY_DSN. |
| js/frontend/Dockerfile | Adds VITE_SENTRY_DSN build arg/env propagation. |
| js/frontend/.env.example | Documents VITE_SENTRY_DSN. |
| .github/workflows/deploy-frontend.yml | Passes VITE_SENTRY_DSN secret as a Docker build-arg. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.