Bugsnag-js: v4 - access to original exception in beforeSend

Created on 15 Nov 2018  路  2Comments  路  Source: bugsnag/bugsnag-js

Desired Behavior & Use Case

Currently in v4.x, the beforeSend callback receives a report object that does not include the original exception objects that are associated w/ the report. Having the original error instance included in the report would allow clients to leverage more sophisticated logic when determining whether or not to send the report along to the server. This would enable ember applications to leverage things like isAjaxError.

Related to #43.

feature request

Most helpful comment

This seems like something we can consider. I see how it could be useful for you.

All 2 comments

This seems like something we can consider. I see how it could be useful for you.

+1 on this. Specifically, it's not uncommon for 3rd-party libraries to put essential information about errors in ad-hoc properties. Some specific examples I've run into include:

  • @sendgrid/client: error.response.body.errors for errors returned from their service API
  • sequelize: error.original.sql for the raw SQL query, error.errors for data validation errors
  • joi: error.annotate() for validation error details
  • ajv: error.errors for validation error details

Being able to append this information to a bug report would be extremely helpful.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

lifeiscontent picture lifeiscontent  路  6Comments

H2go picture H2go  路  5Comments

darkyndy picture darkyndy  路  4Comments

nathanwelch picture nathanwelch  路  6Comments

killia15 picture killia15  路  6Comments