fix: res is not set, return code 0
This commit is contained in:
parent
c359e2221a
commit
14da27e52e
1 changed files with 2 additions and 2 deletions
|
@ -77,7 +77,7 @@ class AuthInterface:
|
||||||
raise AuthException(endpoint, res.status, data, kwargs)
|
raise AuthException(endpoint, res.status, data, kwargs)
|
||||||
return data
|
return data
|
||||||
except TimeoutError:
|
except TimeoutError:
|
||||||
raise AuthException(endpoint, res.status, {"error": "request timed out"}, kwargs)
|
raise AuthException(endpoint, 0, {"error": "request timed out"}, kwargs)
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
async def _get(cls, endpoint:str, **kwargs) -> Dict[str, Any]:
|
async def _get(cls, endpoint:str, **kwargs) -> Dict[str, Any]:
|
||||||
|
@ -93,7 +93,7 @@ class AuthInterface:
|
||||||
raise AuthException(endpoint, res.status, data, kwargs)
|
raise AuthException(endpoint, res.status, data, kwargs)
|
||||||
return data
|
return data
|
||||||
except TimeoutError:
|
except TimeoutError:
|
||||||
raise AuthException(endpoint, res.status, {"error": "request timed out"}, kwargs)
|
raise AuthException(endpoint, 0, {"error": "request timed out"}, kwargs)
|
||||||
|
|
||||||
class OfflineAuthenticator(AuthInterface):
|
class OfflineAuthenticator(AuthInterface):
|
||||||
def __init__(self, name:str, id:str=''):
|
def __init__(self, name:str, id:str=''):
|
||||||
|
|
Loading…
Reference in a new issue