File tree Expand file tree Collapse file tree 1 file changed +14
-10
lines changed Expand file tree Collapse file tree 1 file changed +14
-10
lines changed Original file line number Diff line number Diff line change @@ -32,16 +32,20 @@ function CollectorApi (options) {
3232// USE THIS WITH CAUTION, IT WILL BE BLOCKING
3333CollectorApi . prototype . _sendSync = function ( destinationUrl , data ) {
3434 debug ( 'sending data to trace servers sync: ' , JSON . stringify ( data ) )
35- requestSync ( 'POST' , destinationUrl , {
36- json : data ,
37- headers : {
38- 'Authorization' : 'Bearer ' + this . apiKey ,
39- 'Content-Type' : 'application/json' ,
40- 'X-Reporter-Version' : libPackage . version ,
41- 'X-Reporter-Language' : this . collectorLanguage
42- } ,
43- timeout : 1000
44- } )
35+ try {
36+ requestSync ( 'POST' , destinationUrl , {
37+ json : data ,
38+ headers : {
39+ 'Authorization' : 'Bearer ' + this . apiKey ,
40+ 'Content-Type' : 'application/json' ,
41+ 'X-Reporter-Version' : libPackage . version ,
42+ 'X-Reporter-Language' : this . collectorLanguage
43+ } ,
44+ timeout : 1000
45+ } )
46+ } catch ( ex ) {
47+ debug ( 'error sending data to trace servers sync: ' , ex )
48+ }
4549}
4650
4751CollectorApi . prototype . _withInstanceInfo = function ( data ) {
You can’t perform that action at this time.
0 commit comments