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