diff --git a/json-api/client-tests/main.py b/json-api/client-tests/main.py index 63f7a8d..8002455 100644 --- a/json-api/client-tests/main.py +++ b/json-api/client-tests/main.py @@ -16,8 +16,11 @@ def login() -> (Request, str): 200 ) response = req.fire() - jwt = response.json().get('jwt') - return (req, jwt) + try: + jwt = response.json().get('jwt') + return (req, jwt) + except: + return (req, None) def make_channel(url: str, id: int, jwt: str) -> (Request, int): # making a text channel @@ -89,6 +92,7 @@ if __name__ == '__main__': login_req, jwt = login() if jwt is None: print('Unable to /login - stopping now to avoid pointless failure') + req.show_response() exit(1) admin.jwt = jwt