Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(sentry): capture error in Sentry when departure fetch fails #1754

Merged
merged 5 commits into from
Dec 3, 2024

Conversation

SelmaBergstrand
Copy link
Collaborator

@SelmaBergstrand SelmaBergstrand commented Nov 29, 2024

Denne PR-en fikser sentry-konfigurasjonen vår så dsn-variabelen også er tilgjengelig på klientens browser (og vi får tak i feil derfra).

I tillegg legges det på en custom error-catching når fetch fra journeyplanner feiler, timer ut eller ikke returnerer noe data.

edit: legger også på custom feilmelding når server-side fetch feiler.

For å teste dette lokalt må du først:

  • kommentere ut enabled: process.env.NODE_ENV !== 'development', fra de tre sentry-config-filene
  • sjekke at localhost-feilmeldinger ikke er filtrert bort i sentry-prosjektet (inn på sentry web client)
  • endre dsn-variabelnavnet på env.local til NEXT_PUBLIC_SENTRY_DSN_URL

så må du kræsje fetch, f eks ved å endre timeout-verdien til et veldig lavt tall.

Bør dukke opp i sentry:
Screenshot 2024-11-29 at 11 07 22

@SelmaBergstrand SelmaBergstrand changed the title Sentry exception on fetch error feat(sentry): capture error in Sentry when departure fetch fails Nov 29, 2024
tavla/README.md Outdated Show resolved Hide resolved
tavla/pages/[id].tsx Show resolved Hide resolved
tavla/pages/[id].tsx Outdated Show resolved Hide resolved
tavla/src/Board/scenarios/QuayTile/index.tsx Show resolved Hide resolved
@SelmaBergstrand SelmaBergstrand merged commit 822ef71 into main Dec 3, 2024
3 checks passed
@SelmaBergstrand SelmaBergstrand deleted the sentry-exception-on-fetch-error branch December 3, 2024 11:19
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.

3 participants