dash icon indicating copy to clipboard operation
dash copied to clipboard

[Feature Request] Callback Errors on production environments with Debug=False

Open BSd3v opened this issue 2 years ago • 2 comments
trafficstars

Is your feature request related to a problem? Please describe. When errors occur during callbacks on a production environment, with debug=False. This breaks the production and more than likely restarts the worker.

Describe the solution you'd like When starting up the server, allow for a mailbox item like smtp to be passed in order to send error alerts with traceback messages to the identified email address. ie app.run(mail=mail, error_to=emailaddress) Then, when an error occurs, raise PreventUpdate or some other standard error message, along the lines of "IT has been notified of the error that just occurred."

Describe alternatives you've considered Wrapping all callbacks with the try except clause where an alert is sent to my email.

BSd3v avatar Dec 01 '22 18:12 BSd3v

This would be a cool feature! +1

vsisl avatar Apr 17 '24 14:04 vsisl

Thanks @vsisl

I have a PR that will address this request, although not quite the same way that I initially suggest here:

https://github.com/plotly/dash/pull/2829

In this there is also a link to a forum post that will allow you to apply this universal error handling today.

BSd3v avatar Apr 18 '24 09:04 BSd3v