Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
🥅 (donate) notify front-end errors to bugsnag (#2956)
Updating reCAPTCHA on the donor form presents no ideal solutions so far: - (current) [react-recaptcha](https://www.npmjs.com/package/react-recaptcha): last update was 5 years ago - [react-google-recaptcha](https://www.npmjs.com/package/react-google-recaptcha): quite a few issues on GH, current migration attempts are bumpy - [react-hook-recaptcha](https://github.com/tomliangg/react-hook-recaptcha): would require migrating the whole form from a class to a functional component In this context, the benefit of switching recaptcha libraries is unclear. Instead, I suggest keeping the current working solution in place and making errors more prominent. This will help us react quicker to a possible failure of reCAPTCHA and act accordingly. Given the high threshold for errors to be sent to slack (at least 50 / day) on the [default site bugsnag configuration](https://app.bugsnag.com/settings/our-world-in-data/projects/our-world-in-data-website/integrations/team-notification/60eecfe5fec132e6de9a2fc6), I added [a new configuration to send notifications on every error happening on /donate](https://app.bugsnag.com/settings/our-world-in-data/projects/our-world-in-data-website/integrations/team-notification/6565bd27ceaa0a4b41ed75fe). To test this, the `BUGSNAG_API_KEY` env variable needs to be set.
- Loading branch information