Configprovider: Update the interface to propagate errors (#110814)

* ConfigProvider: Update Get method to return error alongside configuration
This commit is contained in:
Sofia Papagiannaki
2025-09-11 17:26:54 +03:00
committed by GitHub
parent 0b1e640b03
commit 7ec9a7a4a8
2 changed files with 5 additions and 4 deletions
+2 -1
View File
@@ -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