From ee79588a551c788494e2ffceec5493769c4a6a50 Mon Sep 17 00:00:00 2001 From: magmaus3 Date: Sun, 30 Oct 2022 17:18:37 +0100 Subject: [PATCH] Fix typo --- iwm_browser/main.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/iwm_browser/main.py b/iwm_browser/main.py index 3e06141..01ab96a 100644 --- a/iwm_browser/main.py +++ b/iwm_browser/main.py @@ -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)