You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is there some built-in/correct way of sending an email to the admin if an error occurs on some handler? Occasionally, there are bugs in my handlers that raise exceptions. Then, the email ends up in undeliverable queue. I won't notice it and I won't know the email wasn't delivered. I'd like to get an email notification like "An exception was raised on your Salmon handler foobar". Is there some easy convenient way to achieve this? Or is there some better way to handle this problem altogether?
The text was updated successfully, but these errors were encountered:
You can define your own handlers for Python's logging module and get it to send you an email on every error, but that would easily flood your inbox with error messages.
For example, Inboxen.org receives nearly 1000 times more mail than it receives website visitors. If our database went down, we'd get maybe 20 error message emails from Django but Salmon would produce something like 1000 error messages. That's a good way to perform a denial of service attack on yourself!
If you don't want to manually check salmon's error log yourself, you could always try logwatch (available in most distributions)
Thanks for the comments! For now, I just handled that specific error case in my code by sending an email back to the sender with an error message. This works for my purposes now. But perhaps some solution based on logs would be better and more generic.
Is there some built-in/correct way of sending an email to the admin if an error occurs on some handler? Occasionally, there are bugs in my handlers that raise exceptions. Then, the email ends up in undeliverable queue. I won't notice it and I won't know the email wasn't delivered. I'd like to get an email notification like "An exception was raised on your Salmon handler foobar". Is there some easy convenient way to achieve this? Or is there some better way to handle this problem altogether?
The text was updated successfully, but these errors were encountered: