File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -35,6 +35,7 @@ export function captureException(err: Error) {
3535 ) ;
3636 }
3737 } ) ;
38+
3839 Sentry . captureException ( err ) ;
3940 } ) ;
4041}
Original file line number Diff line number Diff line change @@ -56,7 +56,8 @@ describe('sentry/browser', () => {
5656 it ( 'works without request url' , ( ) => {
5757 const data = {
5858 key : 'value' ,
59- } as Sentry . Event ;
59+ type : undefined ,
60+ } as Sentry . ErrorEvent ;
6061
6162 const resultData = sentryWrapper . beforeSend ( config , data , { } ) ;
6263
@@ -65,13 +66,14 @@ describe('sentry/browser', () => {
6566
6667 it ( 'fingerprints errno' , ( ) => {
6768 const data = {
69+ type : undefined ,
6870 request : {
6971 url : 'https://example.com' ,
7072 } ,
7173 tags : {
7274 errno : '100' ,
7375 } ,
74- } as Sentry . Event ;
76+ } as Sentry . ErrorEvent ;
7577
7678 const resultData = sentryWrapper . beforeSend ( config , data , { } ) ;
7779 expect ( resultData ?. fingerprint ?. [ 0 ] ) . toEqual ( 'errno100' ) ;
@@ -100,7 +102,7 @@ describe('sentry/browser', () => {
100102
101103 it ( 'will return null from before send when disabled' , ( ) => {
102104 sentryWrapper . disable ( ) ;
103- expect ( sentryWrapper . beforeSend ( { } , { } , { } ) ) . toBeNull ( ) ;
105+ expect ( sentryWrapper . beforeSend ( { } , { type : undefined } , { } ) ) . toBeNull ( ) ;
104106 } ) ;
105107 } ) ;
106108} ) ;
Original file line number Diff line number Diff line change @@ -34,7 +34,7 @@ export function captureException(err: Error) {
3434 ) ;
3535 }
3636 } ) ;
37- _Sentry . captureException ( err ) ;
37+ Sentry . captureException ( err ) ;
3838 } ) ;
3939}
4040
@@ -67,7 +67,7 @@ export function enable() {
6767 */
6868export function beforeSend (
6969 opts : SentryConfigOpts ,
70- event : Sentry . Event ,
70+ event : Sentry . ErrorEvent ,
7171 _hint ?: Sentry . EventHint
7272) {
7373 if ( sentryEnabled === false ) {
You can’t perform that action at this time.
0 commit comments