mirror of
https://github.com/nexy7574/LCC-bot.git
synced 2024-09-19 01:53:39 +01:00
conditionally raise error
This commit is contained in:
parent
8d5744c23d
commit
74b3385051
1 changed files with 2 additions and 1 deletions
|
@ -551,7 +551,8 @@ class OtherCog(commands.Cog):
|
|||
},
|
||||
follow_redirects=False
|
||||
)
|
||||
response.raise_for_status()
|
||||
if response.status_code not in range(200, 400):
|
||||
response.raise_for_status()
|
||||
except httpx.HTTPError as e:
|
||||
raise RuntimeError(f"Failed to upload OCR content: `{e}`")
|
||||
else:
|
||||
|
|
Loading…
Reference in a new issue