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

user/metadata not always provided when using Bugsnag.notifyException

Offen
#84 1 Kommentar 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen
Vorherrschende Sprache
JavaScript
Sterne
20
Forks
32
PR-Merge-Kennzahlen
Keine gemergten PRs in 30 T.

Beschreibung

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?

Beitragsleitfaden

Für dieses Repository ist kein Beitragsleitfaden indexiert

Bewertung

Dieses Issue wurde noch nicht bewertet.

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.