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:
|
try:
|
||||||
rq = httpx.get(BASE_URL + "/api/v1/user/" + str(user_id), timeout=10)
|
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")
|
return error_template.render(reason="Server is unavailable right now")
|
||||||
searchResults = rq.json()
|
searchResults = rq.json()
|
||||||
print(rq.url)
|
print(rq.url)
|
||||||
|
@ -162,6 +162,7 @@ async def showUser(user_id: int):
|
||||||
except json.decoder.JSONDecodeError:
|
except json.decoder.JSONDecodeError:
|
||||||
return error_template.render(reason="Failed to parse server response.", details=rq.text)
|
return error_template.render(reason="Failed to parse server response.", details=rq.text)
|
||||||
except Exception as exc:
|
except Exception as exc:
|
||||||
|
print(exc)
|
||||||
return error_template.render(reason="Uncaught exception", details=exc)
|
return error_template.render(reason="Uncaught exception", details=exc)
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue