File tree Expand file tree Collapse file tree 2 files changed +10
-2
lines changed
backend/src/modules/smartcontract Expand file tree Collapse file tree 2 files changed +10
-2
lines changed Original file line number Diff line number Diff line change @@ -46,8 +46,12 @@ export class contractController {
46
46
private readonly userService ?: UserService ,
47
47
) {
48
48
setTimeout ( ( ) => {
49
- this . contractService . syncAllServices ( ) ;
49
+ try {
50
+ this . contractService . syncAllServices ( ) ;
50
51
this . contractService . syncAllDevices ( ) ;
52
+ } catch ( error ) {
53
+ console . log ( "contractController constructor error:" , error )
54
+ }
51
55
} , 4000 ) ;
52
56
}
53
57
Original file line number Diff line number Diff line change @@ -479,7 +479,11 @@ export class ContractService {
479
479
updateDate : new Date ( String ( contractDevices [ 10 ] ) ) ,
480
480
} ;
481
481
482
- this . deviceService . insertDevice ( newDevice ) ;
482
+ this . deviceService . insertDevice ( newDevice )
483
+ . catch ( error => {
484
+ console . log ( 'syncAllDevices insertDevice error:' , error ) ;
485
+ } ) ;
486
+
483
487
}
484
488
} ) ;
485
489
}
You can’t perform that action at this time.
0 commit comments