Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Errors and error logging #90

Open
pcraig3 opened this issue Dec 6, 2024 · 0 comments
Open

Errors and error logging #90

pcraig3 opened this issue Dec 6, 2024 · 0 comments
Labels
Dev This is a dev priority ticket, not strictly user-facing.

Comments

@pcraig3
Copy link
Collaborator

pcraig3 commented Dec 6, 2024

This is a placeholder ticket. This topic deserves more of a discussion. But I have some thoughts around this.

Currently (at the time of writing), our stack traces are spit out to the console as they would be in a regular python app. In terms of the UI, some of them are displayed to users on regular error pages (like 400: Import errors, see #25 for an example) vs others that are using a generic HTTP status code error (pretty much all of our 403s just say "Forbidden").

This means that we can see errors when they are happening viewing the console errors and we are not leaking stack trace stuff to users via the UI. That's good. But it could be improved.

What we should be doing is:

  • consistent error logging: we should do JSON logs basically (will write that ticket also), with consistent keys and values. As a subset of this, we should have errors with a consistent JSON format so that we can find historical errors if needed rather than our messy stacktraces
  • consistent UI logging: I think this can pretty lightweight. We should just use our error template and, in situations where recovery is possible (like validation errors when importing NOFOs), enough info that people can understand how to fix the problem. Ticket Better error message for long headings #25 is an example where our error message does not give people what they need to fix the problem themselves.
@pcraig3 pcraig3 added the Dev This is a dev priority ticket, not strictly user-facing. label Dec 6, 2024
@pcraig3 pcraig3 changed the title [Dev ticket] Errors and error logging Errors and error logging Dec 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Dev This is a dev priority ticket, not strictly user-facing.
Projects
None yet
Development

No branches or pull requests

1 participant