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 {
19
19
}
20
20
21
21
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 ) ;
24
23
}
25
24
async reportSdkDisconnect ( data : SdkConnectDocument ) : Promise < void > {
26
25
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
+ }
29
32
}
30
33
async listCurrentConnections ( data : event_types . PaginatedInstanceRequest ) : Promise < void > {
31
34
console . log ( 'MongoReportStorage.listCurrentConnections' , data ) ;
You can’t perform that action at this time.
0 commit comments