File tree 1 file changed +12
-7
lines changed
components/server/ee/src/workspace
1 file changed +12
-7
lines changed Original file line number Diff line number Diff line change @@ -2294,15 +2294,20 @@ export class GitpodServerEEImpl extends GitpodServerImpl {
2294
2294
const result = await super . getNotifications ( ctx ) ;
2295
2295
const user = this . checkAndBlockUser ( "getNotifications" ) ;
2296
2296
2297
- const billingMode = await this . billingModes . getBillingModeForUser ( user , new Date ( ) ) ;
2298
- if ( billingMode . mode === "usage-based" ) {
2299
- const limit = await this . billingService . checkUsageLimitReached ( user ) ;
2300
- if ( limit . reached ) {
2301
- result . unshift ( "The usage limit is reached." ) ;
2302
- } else if ( limit . almostReached ) {
2303
- result . unshift ( "The usage limit is almost reached." ) ;
2297
+ try {
2298
+ const billingMode = await this . billingModes . getBillingModeForUser ( user , new Date ( ) ) ;
2299
+ if ( billingMode . mode === "usage-based" ) {
2300
+ const limit = await this . billingService . checkUsageLimitReached ( user ) ;
2301
+ if ( limit . reached ) {
2302
+ result . unshift ( "The usage limit is reached." ) ;
2303
+ } else if ( limit . almostReached ) {
2304
+ result . unshift ( "The usage limit is almost reached." ) ;
2305
+ }
2304
2306
}
2307
+ } catch ( error ) {
2308
+ log . warn ( { userId : user . id } , "Could not get usage-based notifications for user" , { error } ) ;
2305
2309
}
2310
+
2306
2311
return result ;
2307
2312
}
2308
2313
You can’t perform that action at this time.
0 commit comments