Skip to content

Commit

Permalink
fix(worker): send whole error to rollbar
Browse files Browse the repository at this point in the history
when it does not have a message
  • Loading branch information
Realtin committed Jun 25, 2019
1 parent 1df3c61 commit b577d0d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/worker.js
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ module.exports = async function worker (scheduleJob, channel, job) {
channel.nack(job)
}

const error = typeof err === 'object' && !(err instanceof Error)
const error = typeof err === 'object' && !(err instanceof Error) && err.message
? new Error(err.message)
: err

Expand Down

0 comments on commit b577d0d

Please sign in to comment.