news-catalyst / google-app-scripts

a collection of scripts for tinynews google docs add-ons
https://script.google.com/a/newscatalyst.org/d/1ILURq69o3cYUy6k1n1X6HwxdMfl9xWNhILYuZxgLfeblb3IR15WCMZSj/edit
1 stars 1 forks source link

Notify on errors #360

Closed jacqui closed 2 years ago

jacqui commented 3 years ago

I'd like to know when errors occur in the sidebar as tiny news orgs use the platform to manage content, preview and publish articles and pages.

I'm thinking of making a table in our postgres database to store these errors, like google_sidebar_errors, keyed per organization. I could set up an event trigger in Hasura to post to a webhook on every insert to this table. Not sure where this would post to just yet - there are probably existing notifier services we could use, but it would also be relatively simple to write a lambda function that sends an email or text notification as well. Finally, a dashboard page would be nice to have too listing all errors, and even better, tracking whether each error has been handled.

However, it occurs to me that I'm basically describing Airbrake, a service I've used a lot in the past and found really helpful. Maybe the better idea is to figure out if it's possible to get Airbrake working in the Google Docs sidebar code. It might be worth it - cheapest plan is $19/month. Just an idea.