on_error.sql handler for errors

Ouverte
#946 2 commentaires 1 réaction 0 personnes assignées Voir sur GitHub

Les mainteneurs répondent en général sous 1 jour

Personne n'a encore pris cette issue.

Évaluation

Difficulté
5/5
Temps estimé
Plus d'une semaine
Accessibilité débutants
35/100
Type d'issue
Fonctionnalité
Clarté
Plutôt claire
Activité
À l'abandon
Stack technique
rust, sql
Domaine
api, backend

Piste de recherche

The issue proposes an on_error.sql handler but does not identify a code entry point or test. First, trace how errors are rendered and how SQL pages are executed, including the production behavior of error.handlebars; the reporter says they could not find where to insert the handler. Done would mean a defined handler receives the error details and can perform SQL operations, with tests covering the behavior.

Rédigé par le modèle d'indexation à partir du texte de l'issue.

Description

enhancement

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.

Langage dominant
Rust
Étoiles
2.6k
Forks
175
Merge moyen
14 h 16 min
PR mergées (30 j)
43

Préparer son environnement

Par où commencer

  1. Lisez l'issue en entier, puis le guide de contribution du projet.
  2. Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
  3. Forkez le dépôt et travaillez sur une branche.
  4. Ouvrez une pull request qui référence le numéro de l'issue.

Autres issues de sqlpage/SQLPage

Toutes les issues de sqlpage/SQLPage

Issues similaires

Plus d'issues Rust

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.