Report unhandledRejections and uncaughtExceptions to Sentry (#17014)
* Report to Sentry in error handlers * Support optional metadata
This commit is contained in:
@@ -76,7 +76,7 @@ module.exports = class FailBot {
|
||||
* @param {Error} error
|
||||
* @param {any} metadata
|
||||
*/
|
||||
async sendException (error, metadata) {
|
||||
async sendException (error, metadata = {}) {
|
||||
const data = Object.assign({ app: this.app }, this.getFailbotContext(), metadata)
|
||||
const body = this.formatJSON(error, Object.assign({ app: this.app }, data))
|
||||
|
||||
|
||||
Reference in New Issue
Block a user