Description
What are you building with SQLPage ?
An application in the healthcare industry.
What is your problem ?
We would like to log errors that our users encounter and potentially create tickets in our support system when a user receives an error message.
Describe the solution you'd like
It would be great if there was an on_error.sql handler that received the error message, URL, sqlpage.variables() and also the backtrace. It would be cool if we could write this with SQL as any other SQL page, and insert the log into our database and potentially execute other operations like fetch() to call out to other systems (to send an email, create a ticket, etc.)
Describe alternatives you've considered
There are no really good alternatives currently available because in production environment we do not get the backtrace in error.handlerbars, so we can't even log the error somehow from the user's browser. The error is essentially lost.
Additional context
I've taken a stab in the rust at creating this as pull request, but I cannot find a good place in the code to insert this handler. If you could give some ideas as to where a good handler code might live, I could submit as a PR.