@@ -24,10 +24,7 @@ export class AutoUpdatedStaticsProvider implements OnModuleInit {
24
24
*/
25
25
onModuleInit ( ) {
26
26
// async operation to not wait for it and not block user in case when no internet connection
27
- Promise . all ( [
28
- this . initDefaults ( ) ,
29
- this . autoUpdate ( ) ,
30
- ] ) ;
27
+ this . initDefaults ( ) . catch ( ) . finally ( this . autoUpdate . bind ( this ) ) ;
31
28
}
32
29
33
30
/**
@@ -59,7 +56,7 @@ export class AutoUpdatedStaticsProvider implements OnModuleInit {
59
56
try {
60
57
await this . updateStaticFiles ( ) ;
61
58
} catch ( e ) {
62
- this . logger . error ( 'Unable to update auto static files' , e ) ;
59
+ this . logger . warn ( 'Unable to update auto static files' , e ) ;
63
60
}
64
61
}
65
62
}
@@ -85,7 +82,7 @@ export class AutoUpdatedStaticsProvider implements OnModuleInit {
85
82
try {
86
83
return await getFile ( new URL ( join ( this . options . updateUrl , this . options . zip ) ) . toString ( ) ) ;
87
84
} catch ( e ) {
88
- this . logger . error ( 'Unable to get remote archive' , e ) ;
85
+ this . logger . warn ( 'Unable to get remote archive' , e ) ;
89
86
return null ;
90
87
}
91
88
}
@@ -109,7 +106,7 @@ export class AutoUpdatedStaticsProvider implements OnModuleInit {
109
106
try {
110
107
return await getFile ( new URL ( join ( this . options . updateUrl , this . options . buildInfo ) ) . toString ( ) ) ;
111
108
} catch ( e ) {
112
- this . logger . error ( 'Unable to get remote build info' , e ) ;
109
+ this . logger . warn ( 'Unable to get remote build info' , e ) ;
113
110
return { } ;
114
111
}
115
112
}
@@ -124,7 +121,7 @@ export class AutoUpdatedStaticsProvider implements OnModuleInit {
124
121
'utf8' ,
125
122
) ) ;
126
123
} catch ( e ) {
127
- this . logger . error ( 'Unable to get local checksum' , e ) ;
124
+ this . logger . warn ( 'Unable to get local checksum' , e ) ;
128
125
return { } ;
129
126
}
130
127
}
0 commit comments