Summary
hCaptcha can return a number of error codes to the client (load error, rate limited, challenge expired, etc) -- we should log these to Logstash so that we have visibility into the frequency of these occurring. We should also emit events to Prometheus for tracking in Grafana.
Technical notes
- Use mw.errorLogger.logError() to export these messages to Logstash
- Use mw.track( 'stats. [...] ) for exporting to Prometheus
Acceptance criteria
- hCaptcha errors appear in mw-client-errors
- Errors and form submission events can be plotted in Grafana