File tree Expand file tree Collapse file tree 7 files changed +15
-15
lines changed Expand file tree Collapse file tree 7 files changed +15
-15
lines changed Original file line number Diff line number Diff line change 1+ import { faro } from "@grafana/faro-react" ;
12import { Action , ThunkAction } from "@reduxjs/toolkit" ;
2- import { captureException } from "@sentry/react" ;
33import { contributionPageSlice } from "src/redux/slices/contribution-page" ;
44import { AppState } from "src/redux/store" ;
55import { fetchV2 } from "src/utils/fetch" ;
@@ -17,6 +17,6 @@ export const fetchContributionAction =
1717 dispatch ( contributionPageSlice . actions . set ( { contribution } ) ) ;
1818 } catch ( error ) {
1919 dispatch ( contributionPageSlice . actions . set ( { contribution : "ERROR" } ) ) ;
20- captureException ( error , { tags : { type : "WEB_FETCH" } } ) ;
20+ faro . api . pushError ( error as Error , { type : "WEB_FETCH" } ) ;
2121 }
2222 } ;
Original file line number Diff line number Diff line change 1+ import { faro } from "@grafana/faro-react" ;
12import { Action , ThunkAction } from "@reduxjs/toolkit" ;
2- import { captureException } from "@sentry/react" ;
33import { contributionsPageSlice } from "src/redux/slices/contributions-page" ;
44import { AppState } from "src/redux/store" ;
55import { fetchV2 } from "src/utils/fetch" ;
@@ -13,6 +13,6 @@ export const fetchContributionsListAction =
1313 dispatch ( contributionsPageSlice . actions . set ( { contributionsList : contributions } ) ) ;
1414 } catch ( error ) {
1515 dispatch ( contributionsPageSlice . actions . set ( { contributionsList : "ERROR" } ) ) ;
16- captureException ( error , { tags : { type : "WEB_FETCH" } } ) ;
16+ faro . api . pushError ( error as Error , { type : "WEB_FETCH" } ) ;
1717 }
1818 } ;
Original file line number Diff line number Diff line change 1+ import { faro } from "@grafana/faro-react" ;
12import { Action , ThunkAction } from "@reduxjs/toolkit" ;
2- import { captureException } from "@sentry/react" ;
33import { contributorPageSlice } from "src/redux/slices/contributor-page" ;
44import { AppState } from "src/redux/store" ;
55import { fetchV2 } from "src/utils/fetch" ;
@@ -17,6 +17,6 @@ export const fetchContributorAction =
1717 dispatch ( contributorPageSlice . actions . set ( { contributor } ) ) ;
1818 } catch ( error ) {
1919 dispatch ( contributorPageSlice . actions . set ( { contributor : "ERROR" } ) ) ;
20- captureException ( error , { tags : { type : "WEB_FETCH" } } ) ;
20+ faro . api . pushError ( error as Error , { type : "WEB_FETCH" } ) ;
2121 }
2222 } ;
Original file line number Diff line number Diff line change 1+ import { faro } from "@grafana/faro-react" ;
12import { Action , ThunkAction } from "@reduxjs/toolkit" ;
2- import { captureException } from "@sentry/react" ;
33import { contributorsPageSlice } from "src/redux/slices/contributors-page" ;
44import { AppState } from "src/redux/store" ;
55import { fetchV2 } from "src/utils/fetch" ;
@@ -12,6 +12,6 @@ export const fetchContributorsListAction =
1212 dispatch ( contributorsPageSlice . actions . set ( { contributorsList : contributors } ) ) ;
1313 } catch ( error ) {
1414 dispatch ( contributorsPageSlice . actions . set ( { contributorsList : "ERROR" } ) ) ;
15- captureException ( error , { tags : { type : "WEB_FETCH" } } ) ;
15+ faro . api . pushError ( error as Error , { type : "WEB_FETCH" } ) ;
1616 }
1717 } ;
Original file line number Diff line number Diff line change 1+ import { faro } from "@grafana/faro-react" ;
12import { Action , ThunkAction } from "@reduxjs/toolkit" ;
2- import { captureException } from "@sentry/react" ;
33import { projectPageSlice } from "src/redux/slices/project-page" ;
44import { AppState } from "src/redux/store" ;
55import { fetchV2 } from "src/utils/fetch" ;
@@ -17,6 +17,6 @@ export const fetchProjectAction =
1717 dispatch ( projectPageSlice . actions . set ( { project } ) ) ;
1818 } catch ( error ) {
1919 dispatch ( projectPageSlice . actions . set ( { project : "ERROR" } ) ) ;
20- captureException ( error , { tags : { type : "WEB_FETCH" } } ) ;
20+ faro . api . pushError ( error as Error , { type : "WEB_FETCH" } ) ;
2121 }
2222 } ;
Original file line number Diff line number Diff line change 1+ import { faro } from "@grafana/faro-react" ;
12import { Action , ThunkAction } from "@reduxjs/toolkit" ;
2- import { captureException } from "@sentry/react" ;
33import { projectsPageSlice } from "src/redux/slices/projects-page" ;
44import { AppState } from "src/redux/store" ;
55import { fetchV2 } from "src/utils/fetch" ;
@@ -12,6 +12,6 @@ export const fetchProjectsListAction =
1212 dispatch ( projectsPageSlice . actions . set ( { projectsList : projects } ) ) ;
1313 } catch ( error ) {
1414 dispatch ( projectsPageSlice . actions . set ( { projectsList : "ERROR" } ) ) ;
15- captureException ( error , { tags : { type : "WEB_FETCH" } } ) ;
15+ faro . api . pushError ( error as Error , { type : "WEB_FETCH" } ) ;
1616 }
1717 } ;
Original file line number Diff line number Diff line change 11import { DEFAULT_LANGUAGE , LANGUAGES } from "@dzcode.io/models/dist/language" ;
22import { LanguageCode } from "@dzcode.io/utils/dist/language" ;
3- import { captureException } from "@sentry/ react" ;
3+ import { faro } from "@grafana/faro- react" ;
44
55export const changeLanguage = ( languageCode : LanguageCode ) => {
66 let newPath = window . location . pathname ;
77 const language = LANGUAGES . find ( ( { code } ) => code === languageCode ) ;
88 if ( ! language ) {
9- console . error ( " Invalid language code" , languageCode ) ;
10- captureException ( `Invalid language code ${ language } ` , { tags : { type : "GENERIC" } } ) ;
9+ const error = new Error ( ` Invalid language code ${ languageCode } ` ) ;
10+ faro . api . pushError ( error ) ;
1111 return ;
1212 }
1313
You can’t perform that action at this time.
0 commit comments