Closed bensteUEM closed 1 year ago
at present only the status code is checked and json.loads can fail (e.g. if not authorized)
if response.status_code == 200: csrf_token = json.loads(response.content)["data"]
The method should "try" json.loads and return the error message from the html document in case it fails. This might also apply to other requests!
Issue created when running WebService with session['ct_api'] = CTAPI(domain, ct_user=user, ct_password=password) which then calls login_ct_ajax_api
session['ct_api'] = CTAPI(domain, ct_user=user, ct_password=password)
login_ct_ajax_api
not reproduceable after replacing ajax login with rest login
at present only the status code is checked and json.loads can fail (e.g. if not authorized)
The method should "try" json.loads and return the error message from the html document in case it fails. This might also apply to other requests!
Issue created when running WebService with
session['ct_api'] = CTAPI(domain, ct_user=user, ct_password=password)
which then callslogin_ct_ajax_api