Skip to content
This repository has been archived by the owner on Feb 8, 2024. It is now read-only.

CORTX-34105: [Fixed] Invalid status code incase of rejected requests by csm-agent #904

Merged
merged 2 commits into from
Sep 2, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion csm/core/agent/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -313,7 +313,7 @@ async def throttler_middleware(request, handler):
if CsmRestApi.__nreq >= CsmRestApi.__request_quota:
# This block get executed when number of request reaches the request quota
CsmRestApi.__nblocked += 1
msg = (f"[{request.request_id}] The request is blocked because the number of requests reached threshold\n"
msg = (f"The request is blocked because the number of requests reached threshold\n"
f"Number of requests blocked since the start is {CsmRestApi.__nblocked}")
Log.warn(msg)
return web.Response(status=429, text="Too many requests")
Expand Down