-
Notifications
You must be signed in to change notification settings - Fork 66
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
add debug output and missing exception handlers to fix #459 #460
base: master
Are you sure you want to change the base?
Conversation
How does logException fixes something? Mind to share |
Hi @kesselb , sorry, I switched the lines, I think the actual fix is below, in line 415. 410 of course only helps in regard of debugging ;-) |
Signed-off-by: Markus Schlichting <[email protected]>
e85a42f
to
19e481f
Compare
Mind to share the exception? Also you overwrite the actual exception message. That makes it harder to debug. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not convinced. Right now the error handling code fails and the original exception message is replaced with a generic error message.
@@ -405,6 +407,12 @@ protected function sendEmailToUser($userName, $email, $lang, $timezone, $maxTime | |||
try { | |||
$this->mailer->send($message); | |||
} catch (\Exception $e) { | |||
$this->logger->logException($e, [ | |||
'message' => 'Failed sending email to user "{user}"', | |||
'user' => $user, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Log the exception with $this->logger->logException($e);
and log a additional warning $this->logger->warning('Failed to send notification email for user {user}', ['user' => $userName]);
. You cannot use Ah that might work as the normalizer will format it. I would still prefer the $userName ;)$user
because it's a IUser object.
change the glue for implode from | to , Co-authored-by: kesselb <[email protected]>
My experience was vice versa - with the output I added with shown here, I got much more details. |
We still don't know why sending the notification failed in the first place. This is fixing symptoms not problems 😟 |
add debug outout and exception handling fix to get rid of over-and-over sent notifications.
I think esp. the changes to line 410 helped to fix the issue.