Configprovider: Update the interface to propagate errors (#110814)
* ConfigProvider: Update Get method to return error alongside configuration
This commit is contained in:
@@ -76,7 +76,8 @@ func ProvideService(ctx context.Context, db db.DB, configProvider configprovider
|
||||
}
|
||||
|
||||
func (s *service) IsDisabled(ctx context.Context) bool {
|
||||
return !s.cfg.Get(ctx).Quota.Enabled
|
||||
c, err := s.cfg.Get(ctx)
|
||||
return err != nil || !c.Quota.Enabled
|
||||
}
|
||||
|
||||
// QuotaReached checks that quota is reached for a target. Runs CheckQuotaReached and take context and scope parameters from the request context
|
||||
|
||||
Reference in New Issue
Block a user