Fix typo
This commit is contained in:
parent
25a57d7b0e
commit
ee79588a55
1 changed files with 2 additions and 1 deletions
|
@ -153,7 +153,7 @@ async def showUser(user_id: int):
|
|||
|
||||
try:
|
||||
rq = httpx.get(BASE_URL + "/api/v1/user/" + str(user_id), timeout=10)
|
||||
if status_code == 503:
|
||||
if rq.status_code == 503:
|
||||
return error_template.render(reason="Server is unavailable right now")
|
||||
searchResults = rq.json()
|
||||
print(rq.url)
|
||||
|
@ -162,6 +162,7 @@ async def showUser(user_id: int):
|
|||
except json.decoder.JSONDecodeError:
|
||||
return error_template.render(reason="Failed to parse server response.", details=rq.text)
|
||||
except Exception as exc:
|
||||
print(exc)
|
||||
return error_template.render(reason="Uncaught exception", details=exc)
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue