fix: handle site expired exception
Signed-off-by: Chinmay D. Pai <chinmaydpai@gmail.com> Co-authored-by: Sahil Khan <sahilkhan28297@gmail.com>
This commit is contained in:
parent
e9e2a89dc8
commit
c560d2fb51
1 changed files with 2 additions and 0 deletions
|
|
@ -42,6 +42,8 @@ class FrappeClient(object):
|
|||
if r.status_code==200 and r.json().get('message') in ("Logged In", "No App"):
|
||||
return r.json()
|
||||
else:
|
||||
if json.loads(r.text).get('exc_type') == "SiteExpiredError":
|
||||
return {"exc_type": "SiteExpiredError"}
|
||||
print(r.text)
|
||||
raise AuthError
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue