Skip to content

Commit 69f5f01

Browse files
Log why the login token can't be used for credentials
And always pass the exception object to the logger. Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
1 parent 57ecf55 commit 69f5f01

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

  • lib/private/Authentication/LoginCredentials

lib/private/Authentication/LoginCredentials/Store.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -98,12 +98,12 @@ public function getLoginCredentials(): ICredentials {
9898

9999
return new Credentials($uid, $user, $password);
100100
} catch (SessionNotAvailableException $ex) {
101-
$this->logger->debug('could not get login credentials because session is unavailable', ['app' => 'core']);
101+
$this->logger->debug('could not get login credentials because session is unavailable', ['app' => 'core', 'exception' => $ex]);
102102
} catch (InvalidTokenException $ex) {
103-
$this->logger->debug('could not get login credentials because the token is invalid', ['app' => 'core']);
103+
$this->logger->debug('could not get login credentials because the token is invalid: ' . $ex->getMessage(), ['app' => 'core', 'exception' => $ex]);
104104
$trySession = true;
105105
} catch (PasswordlessTokenException $ex) {
106-
$this->logger->debug('could not get login credentials because the token has no password', ['app' => 'core']);
106+
$this->logger->debug('could not get login credentials because the token has no password', ['app' => 'core', 'exception' => $ex]);
107107
$trySession = true;
108108
}
109109

0 commit comments

Comments
 (0)