Piping Bugsnag-like exception handling from the browser to Loki?

We currently use Bugsnag to capture unhandled exceptions thrown in the browser by our web app, but are been moving towards the Grafana Cloud stack. I’m wondering if this is a workflow that anyone has set up with Loki.

Specifically, we are looking to pipe console.error output from the browser into the same log/event aggregation we are starting to play with in Grafana’s new managed service. Ideally, we would be able to correlate errors in the client and subsequent errors in the API, but it would probably be enough to just be able to look it all up in the same Grafana dashboard.