File tree Expand file tree Collapse file tree 2 files changed +10
-1
lines changed Expand file tree Collapse file tree 2 files changed +10
-1
lines changed Original file line number Diff line number Diff line change @@ -1160,6 +1160,10 @@ export abstract class Client<O extends ClientOptions = ClientOptions> {
11601160 }
11611161
11621162 this . captureException ( reason , {
1163+ mechanism : {
1164+ handled : false ,
1165+ type : 'internal' ,
1166+ } ,
11631167 data : {
11641168 __sentry__ : true ,
11651169 } ,
Original file line number Diff line number Diff line change @@ -1848,12 +1848,17 @@ describe('Client', () => {
18481848
18491849 client . captureEvent ( { message : 'hello' } , { } , scope ) ;
18501850
1851- expect ( TestClient . instance ! . event ! . exception ! . values ! [ 0 ] ) . toStrictEqual ( { type : 'Error' , value : 'sorry' } ) ;
1851+ expect ( TestClient . instance ! . event ! . exception ! . values ! [ 0 ] ) . toStrictEqual ( {
1852+ type : 'Error' ,
1853+ value : 'sorry' ,
1854+ mechanism : { type : 'internal' , handled : false } ,
1855+ } ) ;
18521856 expect ( captureExceptionSpy ) . toBeCalledWith ( exception , {
18531857 data : {
18541858 __sentry__ : true ,
18551859 } ,
18561860 originalException : exception ,
1861+ mechanism : { type : 'internal' , handled : false } ,
18571862 } ) ;
18581863 expect ( loggerWarnSpy ) . toBeCalledWith (
18591864 `Event processing pipeline threw an error, original event will not be sent. Details have been sent as a new event.\nReason: ${ exception } ` ,
You can’t perform that action at this time.
0 commit comments