We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent ceaa9f1 commit d05f189Copy full SHA for d05f189
api/core/app/features/rate_limiting/rate_limit.py
@@ -110,7 +110,7 @@ def __next__(self):
110
raise StopIteration
111
try:
112
return next(self.generator)
113
- except StopIteration:
+ except Exception:
114
self.close()
115
raise
116
api/services/app_generate_service.py
@@ -108,6 +108,9 @@ def generate(
108
raise ValueError(f"Invalid app mode {app_model.mode}")
109
except RateLimitError as e:
raise InvokeRateLimitError(str(e))
+ rate_limit.exit(request_id)
+ raise
finally:
if not streaming:
rate_limit.exit(request_id)
0 commit comments