File tree Expand file tree Collapse file tree 1 file changed +22
-9
lines changed Expand file tree Collapse file tree 1 file changed +22
-9
lines changed Original file line number Diff line number Diff line change @@ -1368,17 +1368,30 @@ Raven.prototype = {
13681368 status_code : null
13691369 } ;
13701370
1371- return origFetch . apply ( this , args ) . then ( function ( response ) {
1372- fetchData . status_code = response . status ;
1371+ return origFetch
1372+ . apply ( this , args )
1373+ . then ( function ( response ) {
1374+ fetchData . status_code = response . status ;
13731375
1374- self . captureBreadcrumb ( {
1375- type : 'http' ,
1376- category : 'fetch' ,
1377- data : fetchData
1378- } ) ;
1376+ self . captureBreadcrumb ( {
1377+ type : 'http' ,
1378+ category : 'fetch' ,
1379+ data : fetchData
1380+ } ) ;
13791381
1380- return response ;
1381- } ) ;
1382+ return response ;
1383+ } )
1384+ [ 'catch' ] ( function ( err ) {
1385+ // if there is an error performing the request
1386+ self . captureBreadcrumb ( {
1387+ type : 'http' ,
1388+ category : 'fetch' ,
1389+ data : fetchData ,
1390+ level : 'error'
1391+ } ) ;
1392+
1393+ throw err ;
1394+ } ) ;
13821395 } ;
13831396 } ,
13841397 wrappedBuiltIns
You can’t perform that action at this time.
0 commit comments