Skip to content

Commit

Permalink
Fixed rate limiting message
Browse files Browse the repository at this point in the history
  • Loading branch information
Joshua committed Dec 10, 2023
1 parent 688bef2 commit 4637dd6
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions provider_portal/app/api/customer_api/response.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ class Response:
"error_meter_customer_combination": ("Die Kombination von Meter UID und Customer UID existiert nicht.", 404),
"error_no_data": ("Keine Daten im angegebenen Zeitraum vorhanden.", 404),
"error_over_maximum": ("Die Anzahl der angeforderten Messpunkte überschreitet das Maximum. Bitte reduzieren Sie das Abfrageintervall oder teilen Sie die Anfrage auf.", 400),
"error_rate_limiting": ("Das Rate Limit wurde erreicht.", 400),
"error_decoding": ("Das Format konnte nicht dekodiert werden.", 400),

"error_authentication": ("Customer Portal konnte nicht authentifiziert werden.", 400)
Expand Down
2 changes: 1 addition & 1 deletion provider_portal/app/api/customer_api/routes.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ def before_request():

# Check if the IP has exceeded the maximum allowed requests
if len(request_tracker.get(ip_address, {})) >= 300:
res = {"message": "error_over_maximum"}
res = {"message": "error_rate_limiting"}
return Response(dict=res).create_response()


Expand Down

0 comments on commit 4637dd6

Please sign in to comment.