mirror of
https://github.com/YunoHost/moulinette.git
synced 2024-09-03 20:06:31 +02:00
[mod] death to silent unverbose errors èwé
This commit is contained in:
parent
c1ae0dd46c
commit
9c6c92b2c1
1 changed files with 9 additions and 7 deletions
|
@ -93,8 +93,8 @@ class BaseAuthenticator(object):
|
||||||
try:
|
try:
|
||||||
# Extract id and hash from token
|
# Extract id and hash from token
|
||||||
s_id, s_hash = token
|
s_id, s_hash = token
|
||||||
except TypeError:
|
except TypeError as e:
|
||||||
logger.error("unable to extract token parts from '%s'", token)
|
logger.error("unable to extract token parts from '%s' because '%s'", token, e)
|
||||||
if password is None:
|
if password is None:
|
||||||
raise MoulinetteError('error_see_log')
|
raise MoulinetteError('error_see_log')
|
||||||
|
|
||||||
|
@ -110,17 +110,19 @@ class BaseAuthenticator(object):
|
||||||
self.authenticate(password)
|
self.authenticate(password)
|
||||||
except MoulinetteError:
|
except MoulinetteError:
|
||||||
raise
|
raise
|
||||||
except:
|
except Exception as e:
|
||||||
logger.exception("authentication (name: '%s', vendor: '%s') fails",
|
logger.exception("authentication (name: '%s', vendor: '%s') fails because '%s'",
|
||||||
self.name, self.vendor)
|
self.name, self.vendor, e)
|
||||||
raise MoulinetteError('unable_authenticate')
|
raise MoulinetteError('unable_authenticate')
|
||||||
|
|
||||||
# Store session
|
# Store session
|
||||||
if store_session:
|
if store_session:
|
||||||
try:
|
try:
|
||||||
self._store_session(s_id, s_hash, password)
|
self._store_session(s_id, s_hash, password)
|
||||||
except:
|
except Exception as e:
|
||||||
logger.exception("unable to store session")
|
import traceback
|
||||||
|
traceback.print_exc()
|
||||||
|
logger.exception("unable to store session because %s", e)
|
||||||
else:
|
else:
|
||||||
logger.debug("session has been stored")
|
logger.debug("session has been stored")
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue