Don't catch GET errors

This commit is contained in:
Andrew Godwin 2022-11-20 18:50:45 -07:00
parent 5de3a7ad67
commit 0b5a3e5323
1 changed files with 2 additions and 2 deletions

View File

@ -227,9 +227,9 @@ class HttpSignature:
content=body_bytes,
follow_redirects=method == "get",
)
if response.status_code >= 400:
if method == "post" and response.status_code >= 400:
raise ValueError(
f"Request error: {response.status_code} {response.content}"
f"POST error: {response.status_code} {response.content}"
)
return response