diff --git a/frappe/frappeclient.py b/frappe/frappeclient.py index c7498319dc..fe5b5844c8 100644 --- a/frappe/frappeclient.py +++ b/frappe/frappeclient.py @@ -11,6 +11,9 @@ FrappeClient is a library that helps you connect with other frappe systems class AuthError(Exception): pass +class SiteExpiredError(Exception): + pass + class FrappeException(Exception): pass @@ -43,7 +46,7 @@ class FrappeClient(object): return r.json() else: if json.loads(r.text).get('exc_type') == "SiteExpiredError": - return {"exc_type": "SiteExpiredError"} + raise SiteExpiredError print(r.text) raise AuthError