We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 037c996 commit cbb0f52Copy full SHA for cbb0f52
aikido_zen/middleware/set_rate_limit_group.py
@@ -4,16 +4,20 @@
4
5
def set_rate_limit_group(group_id: str):
6
if not group_id or not isinstance(group_id, str):
7
- logger.warning("")
+ logger.warning("Group ID cannot be empty.")
8
return
9
10
context = get_current_context()
11
if not context:
12
+ logger.warning(
13
+ "set_rate_limit_group(...) was called without a context. Make sure to call set_rate_limit_group(...) within an HTTP request."
14
+ )
15
16
17
if context.executed_middleware:
18
19
+ "set_rate_limit_group(...) must be called before the Zen middleware is executed."
20
21
22
context.rate_limit_group = group_id
23
context.set_as_current_context()
0 commit comments