Implements error handling for imap errors #11#34
Implements error handling for imap errors #11#34violoncelloCH merged 4 commits intonextcloud:masterfrom
Conversation
|
thank you for your contribution! DCO is failing because the commit is not signed-off |
Prints IMAP errors and alerts to the nextcloud log. Signed-off-by: Anojh Thayaparan <anojh@hotmail.com>
Signed-off-by: Anojh Thayaparan <anojh@hotmail.com>
|
@violoncelloCH the commits have been signed |
|
thank you @anojht |
|
Shouldn't the log messages only be created if there are really errors or warnings? The code looks as if the log entries are always generated. |
|
good point @cweiske |
Signed-off-by: Anojh Thayaparan <anojh@hotmail.com>
|
@violoncelloCH I have stored the errors and checked for empty list, before printing. |
There was a problem hiding this comment.
thank you!
apart the syntax error it seems to work 👍 great improvement!
only downside: for failed logins we get a imap error additional to the warning from the core
{"reqId":"lAvu20WTmO8tZhPGEboF","level":3,"time":"2019-01-30T16:31:11+00:00","remoteAddr":"127.0.0.1","user":"--","app":"user_external","method":"POST","url":"\/nextcloud\/index.php\/login?user=testuser","message":"ERROR: IMAP Error: Array\n(\n [0] => Can not authenticate to IMAP server: [AUTHENTICATIONFAILED] Authentication failed.\n)\n","userAgent":"Mozilla\/5.0 (X11; Ubuntu; Linux x86_64; rv:64.0) Gecko\/20100101 Firefox\/64.0","version":"16.0.0.0"}
{"reqId":"lAvu20WTmO8tZhPGEboF","level":2,"time":"2019-01-30T16:31:11+00:00","remoteAddr":"127.0.0.1","user":"--","app":"core","method":"POST","url":"\/nextcloud\/index.php\/login?user=testuser","message":"Login failed: 'testuser' (Remote IP: '127.0.0.1')","userAgent":"Mozilla\/5.0 (X11; Ubuntu; Linux x86_64; rv:64.0) Gecko\/20100101 Firefox\/64.0","version":"16.0.0.0"}
Signed-off-by: Anojh Thayaparan <anojh@hotmail.com>
|
@violoncelloCH Feel free to merge this here. 1 review for apps is fine. Only for the server part we need 2 👍 |
|
@MorrisJobke I just thought another review from one of you could be good, because I'm not that experienced yet... but I tested it once more and think it's fine, so merging it... |
Prints IMAP errors and alerts to the nextcloud log. See #11
closes #11