File tree Expand file tree Collapse file tree 2 files changed +8
-0
lines changed
Expand file tree Collapse file tree 2 files changed +8
-0
lines changed Original file line number Diff line number Diff line change @@ -607,6 +607,12 @@ def _load_feature_flags(self):
607607 self .feature_flags_by_key = {}
608608 self .group_type_mapping = {}
609609 self .cohorts = {}
610+
611+ if self .debug :
612+ raise APIError (
613+ status = 402 ,
614+ message = "PostHog feature flags quota limited" ,
615+ )
610616 else :
611617 self .log .error (f"[FEATURE FLAGS] Error loading feature flags: { e } " )
612618 except Exception as e :
Original file line number Diff line number Diff line change @@ -70,6 +70,8 @@ def _process_response(
7070 log .debug (success_message )
7171 response = res .json () if return_json else res
7272 # Handle quota limited decide responses by raising a specific error
73+ # NB: other services also put entries into the quotaLimited key, but right now we only care about feature flags
74+ # since most of the other services handle quota limiting in other places in the application.
7375 if (
7476 isinstance (response , dict )
7577 and "quotaLimited" in response
You can’t perform that action at this time.
0 commit comments