improve non-json error handling

This commit is contained in:
eli fessler
2022-10-08 12:54:35 -10:00
parent 2aa962ce45
commit c872b45821

View File

@@ -320,7 +320,8 @@ def get_bullet(web_service_token, web_view_ver, app_user_agent, user_lang, user_
bullet_resp = json.loads(r.text)
bullet_token = bullet_resp["bulletToken"]
except (json.decoder.JSONDecodeError, TypeError):
print("Got non-JSON response from Nintendo.")
print("Got non-JSON response from Nintendo (in api/bullet_tokens step:")
print(bullet_resp)
sys.exit(1)
except:
print("Error from Nintendo (in api/bullet_tokens step):")