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" ;
1
2
import { Action , ThunkAction } from "@reduxjs/toolkit" ;
2
- import { captureException } from "@sentry/react" ;
3
3
import { contributionPageSlice } from "src/redux/slices/contribution-page" ;
4
4
import { AppState } from "src/redux/store" ;
5
5
import { fetchV2 } from "src/utils/fetch" ;
@@ -17,6 +17,6 @@ export const fetchContributionAction =
17
17
dispatch ( contributionPageSlice . actions . set ( { contribution } ) ) ;
18
18
} catch ( error ) {
19
19
dispatch ( contributionPageSlice . actions . set ( { contribution : "ERROR" } ) ) ;
20
- captureException ( error , { tags : { type : "WEB_FETCH" } } ) ;
20
+ faro . api . pushError ( error as Error , { type : "WEB_FETCH" } ) ;
21
21
}
22
22
} ;
Original file line number Diff line number Diff line change
1
+ import { faro } from "@grafana/faro-react" ;
1
2
import { Action , ThunkAction } from "@reduxjs/toolkit" ;
2
- import { captureException } from "@sentry/react" ;
3
3
import { contributionsPageSlice } from "src/redux/slices/contributions-page" ;
4
4
import { AppState } from "src/redux/store" ;
5
5
import { fetchV2 } from "src/utils/fetch" ;
@@ -13,6 +13,6 @@ export const fetchContributionsListAction =
13
13
dispatch ( contributionsPageSlice . actions . set ( { contributionsList : contributions } ) ) ;
14
14
} catch ( error ) {
15
15
dispatch ( contributionsPageSlice . actions . set ( { contributionsList : "ERROR" } ) ) ;
16
- captureException ( error , { tags : { type : "WEB_FETCH" } } ) ;
16
+ faro . api . pushError ( error as Error , { type : "WEB_FETCH" } ) ;
17
17
}
18
18
} ;
Original file line number Diff line number Diff line change
1
+ import { faro } from "@grafana/faro-react" ;
1
2
import { Action , ThunkAction } from "@reduxjs/toolkit" ;
2
- import { captureException } from "@sentry/react" ;
3
3
import { contributorPageSlice } from "src/redux/slices/contributor-page" ;
4
4
import { AppState } from "src/redux/store" ;
5
5
import { fetchV2 } from "src/utils/fetch" ;
@@ -17,6 +17,6 @@ export const fetchContributorAction =
17
17
dispatch ( contributorPageSlice . actions . set ( { contributor } ) ) ;
18
18
} catch ( error ) {
19
19
dispatch ( contributorPageSlice . actions . set ( { contributor : "ERROR" } ) ) ;
20
- captureException ( error , { tags : { type : "WEB_FETCH" } } ) ;
20
+ faro . api . pushError ( error as Error , { type : "WEB_FETCH" } ) ;
21
21
}
22
22
} ;
Original file line number Diff line number Diff line change
1
+ import { faro } from "@grafana/faro-react" ;
1
2
import { Action , ThunkAction } from "@reduxjs/toolkit" ;
2
- import { captureException } from "@sentry/react" ;
3
3
import { contributorsPageSlice } from "src/redux/slices/contributors-page" ;
4
4
import { AppState } from "src/redux/store" ;
5
5
import { fetchV2 } from "src/utils/fetch" ;
@@ -12,6 +12,6 @@ export const fetchContributorsListAction =
12
12
dispatch ( contributorsPageSlice . actions . set ( { contributorsList : contributors } ) ) ;
13
13
} catch ( error ) {
14
14
dispatch ( contributorsPageSlice . actions . set ( { contributorsList : "ERROR" } ) ) ;
15
- captureException ( error , { tags : { type : "WEB_FETCH" } } ) ;
15
+ faro . api . pushError ( error as Error , { type : "WEB_FETCH" } ) ;
16
16
}
17
17
} ;
Original file line number Diff line number Diff line change
1
+ import { faro } from "@grafana/faro-react" ;
1
2
import { Action , ThunkAction } from "@reduxjs/toolkit" ;
2
- import { captureException } from "@sentry/react" ;
3
3
import { projectPageSlice } from "src/redux/slices/project-page" ;
4
4
import { AppState } from "src/redux/store" ;
5
5
import { fetchV2 } from "src/utils/fetch" ;
@@ -17,6 +17,6 @@ export const fetchProjectAction =
17
17
dispatch ( projectPageSlice . actions . set ( { project } ) ) ;
18
18
} catch ( error ) {
19
19
dispatch ( projectPageSlice . actions . set ( { project : "ERROR" } ) ) ;
20
- captureException ( error , { tags : { type : "WEB_FETCH" } } ) ;
20
+ faro . api . pushError ( error as Error , { type : "WEB_FETCH" } ) ;
21
21
}
22
22
} ;
Original file line number Diff line number Diff line change
1
+ import { faro } from "@grafana/faro-react" ;
1
2
import { Action , ThunkAction } from "@reduxjs/toolkit" ;
2
- import { captureException } from "@sentry/react" ;
3
3
import { projectsPageSlice } from "src/redux/slices/projects-page" ;
4
4
import { AppState } from "src/redux/store" ;
5
5
import { fetchV2 } from "src/utils/fetch" ;
@@ -12,6 +12,6 @@ export const fetchProjectsListAction =
12
12
dispatch ( projectsPageSlice . actions . set ( { projectsList : projects } ) ) ;
13
13
} catch ( error ) {
14
14
dispatch ( projectsPageSlice . actions . set ( { projectsList : "ERROR" } ) ) ;
15
- captureException ( error , { tags : { type : "WEB_FETCH" } } ) ;
15
+ faro . api . pushError ( error as Error , { type : "WEB_FETCH" } ) ;
16
16
}
17
17
} ;
Original file line number Diff line number Diff line change 1
1
import { DEFAULT_LANGUAGE , LANGUAGES } from "@dzcode.io/models/dist/language" ;
2
2
import { LanguageCode } from "@dzcode.io/utils/dist/language" ;
3
- import { captureException } from "@sentry/ react" ;
3
+ import { faro } from "@grafana/faro- react" ;
4
4
5
5
export const changeLanguage = ( languageCode : LanguageCode ) => {
6
6
let newPath = window . location . pathname ;
7
7
const language = LANGUAGES . find ( ( { code } ) => code === languageCode ) ;
8
8
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 ) ;
11
11
return ;
12
12
}
13
13
You can’t perform that action at this time.
0 commit comments