mirror of
https://github.com/OpenBankProject/API-Manager.git
synced 2026-02-06 16:46:57 +00:00
enhanced the error handling for DirectLogin
This commit is contained in:
parent
1609f752f3
commit
3f5be140b8
@ -35,7 +35,11 @@ class DirectLoginAuthenticator(Authenticator):
|
||||
try:
|
||||
response = requests.post(url, headers=headers)
|
||||
except requests.exceptions.ConnectionError as err:
|
||||
raise AuthenticatorError(err)
|
||||
raise AuthenticatorError(Exception("OBP-API server is not running or do not response properly. "
|
||||
"Please check OBP-API server. "
|
||||
"Details: "+str(err)))
|
||||
except BaseException as err:
|
||||
raise AuthenticatorError(Exception("Unknown Error. Details:"+ str(err)))
|
||||
|
||||
result = response.json()
|
||||
if response.status_code != 201:
|
||||
|
||||
Loading…
Reference in New Issue
Block a user