If an exception occurs somewhere it's not expected, it often results in an unpleasant stack trace that's not very helpful. #333 goes some way to addressing this, but it may be that a catch-all exception handler would result in a substantially improved user experience.
It would be good to explore whether we can add a catch-all exception handler that makes these error messages less confusing to someone new to LabThings, and gives a more helpful HTTP response. Ideally this would make the stack trace accessible for debugging, without obscuring the final message which ought to be along the lines of "LabThings has encountered an error, here's where you report a bug".
This is probably a separate issue from errors that originate in user code, which ought to be handled explicitly before they propagate outside of individual response handlers.
If an exception occurs somewhere it's not expected, it often results in an unpleasant stack trace that's not very helpful. #333 goes some way to addressing this, but it may be that a catch-all exception handler would result in a substantially improved user experience.
It would be good to explore whether we can add a catch-all exception handler that makes these error messages less confusing to someone new to LabThings, and gives a more helpful HTTP response. Ideally this would make the stack trace accessible for debugging, without obscuring the final message which ought to be along the lines of "LabThings has encountered an error, here's where you report a bug".
This is probably a separate issue from errors that originate in user code, which ought to be handled explicitly before they propagate outside of individual response handlers.