Skip to content

Add error accumulation and notification #219

Description

@jzgom067

What is the new feature?
Currently on the backend, any error with the severity of critical is immediately emailed to the admins in the ADMIN_EMAILS environment variable (with a cooldown). Errors with the severity of error are logged, with no notification.

It would be nice if the error severity errors are aggregated and emailed to the admins at the end of each day, if they do end up happening.

Why do you want this?
While regular errors still shouldn't happen, they are less important and can happen more often than critical ones. It would at least be nice to know when they do, but it doesn't need to happen immediately.

Honestly if it turns out to be too much, we can always remove the email. But it would still be nice to have a record of it outside of the log files on the server.

Update: A better idea for this notification might be using Discord Webhooks as a lightweight and cost-efficient alternative to emails.

Any ideas for implementation?
I tried doing this in the past, and keeping the errors in memory doesn't work because it gets cleared after every request. It might require a new database table to hold the errors until they're cleared at the end of the day.

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions