adopted-ember-addons / adopted-ember-addons/ember-cli-bugsnag

user/metadata not always provided when using Bugsnag.notifyException

Aperta
#84 1 commento 0 reazioni 0 assegnatari Vedi su GitHub
Lingua principale
JavaScript
Stelle
20
Fork
32
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Descrizione

I'm reviewing some recent Bugsnags and realizing that the `user` and `metadata` tags are not always provided as part of the Bugsnag. I'm not 100% certain but I believe it's because there's some instances in our app where we recover from an error but still want to use `Bugsnag.notifyException`.

The problem seems to be, from my understanding of that code, that `getUser()` and `getMetadata()` don't get called except from within `onerror`: https://github.com/binhums/ember-cli-bugsnag/blob/master/app/instance-initializers/bugsnag.js#L50

The result of this seems to be that if the first Bugsnag report issued is a manual `notifyException`, it won't contain pull in your user data / metadata. But if an onerror occurred, it'll set these values for all future `notifyException`s.

I'm surprised no one's noticed this; it makes me wonder if I'm misusing the API somehow? Is it ok that I'm still using `Bugsnag.notifyException` to report handled exceptions? Or is there a better workflow?

Guida per i contributori

Nessuna guida per i contributori indicizzata per questo repository

Valutazione

Questa issue non è ancora stata valutata.

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.