File tree Expand file tree Collapse file tree 1 file changed +7
-4
lines changed
modules/module-mongodb-storage/src/storage Expand file tree Collapse file tree 1 file changed +7
-4
lines changed Original file line number Diff line number Diff line change @@ -19,13 +19,16 @@ export class MongoReportStorage implements storage.ReportStorageFactory {
1919 }
2020
2121 async reportSdkConnect ( data : SdkConnectDocument ) : Promise < void > {
22- const res = await this . db . sdk_report_events . insertOne ( data ) ;
23- console . log ( res ) ;
22+ await this . db . sdk_report_events . insertOne ( data ) ;
2423 }
2524 async reportSdkDisconnect ( data : SdkConnectDocument ) : Promise < void > {
2625 const { _id, ...rest } = data ;
27- const res = await this . db . sdk_report_events . findOneAndUpdate ( { _id } , rest , { upsert : true } ) ;
28- console . log ( res ) ;
26+ console . log ( data ) ;
27+ try {
28+ await this . db . sdk_report_events . findOneAndUpdate ( { _id } , rest , { upsert : true } ) ;
29+ } catch ( error ) {
30+ console . log ( error ) ;
31+ }
2932 }
3033 async listCurrentConnections ( data : event_types . PaginatedInstanceRequest ) : Promise < void > {
3134 console . log ( 'MongoReportStorage.listCurrentConnections' , data ) ;
You can’t perform that action at this time.
0 commit comments