Skip to content

Commit

Permalink
onError: emit full error message and stack (#278)
Browse files Browse the repository at this point in the history
  • Loading branch information
phips28 authored Oct 3, 2021
1 parent b226877 commit 85da781
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/manager.js
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,7 @@ class Manager extends EventEmitter {
}

const onError = error => {
this.emit(events.error, { ...error, queue: name, worker: id })
this.emit(events.error, { ...error, message: error.message, stack: error.stack, queue: name, worker: id })
}

const worker = new Worker({ id, name, options, interval, fetch, onFetch, onError })
Expand Down

0 comments on commit 85da781

Please sign in to comment.