403
This commit is contained in:
parent
9ed547c701
commit
5e9b04db6e
1 changed files with 1 additions and 1 deletions
|
@ -45,7 +45,7 @@ def send_http_request_with_retry(url, data, headers):
|
|||
elif reader_info.get("mode") == "TOGGLE":
|
||||
ser.write("toggle".encode('utf-8'))
|
||||
break # Successful request, no need to retry
|
||||
elif response.status_code in [400, 401, 500]:
|
||||
elif response.status_code in [400, 401, 403, 500]:
|
||||
# Don't retry on certain errors
|
||||
print(f"HTTP POST request failed with status code {response.status_code}. Not retrying.")
|
||||
break
|
||||
|
|
Loading…
Reference in a new issue