While debugging the https://github.com/timgit/pg-boss/issues/274 issue, I found out that the this.boss.on('error', (error) => {.. listener does not show the full error (message, stack).
Listener:
this.boss.on('error', (error) => {
console.error('PgBossQueue: on error', error);
});
I then printed the error in the onError function in manager.js, and that showed the full error.
The problem I see: an Error object has no iterator: TypeError: Found non-callable @@iterator (But this error is not visible with current spread usage in emit, only when you add it to the console.log(...error)) -> So I added message and stack directly.
While debugging the https://github.com/timgit/pg-boss/issues/274 issue, I found out that the
this.boss.on('error', (error) => {..
listener does not show the full error (message, stack).Listener:
Error Log:
I then printed the error in the
onError
function inmanager.js
, and that showed the full error. The problem I see: an Error object has no iterator:TypeError: Found non-callable @@iterator
(But this error is not visible with current spread usage in emit, only when you add it to the console.log(...error)) -> So I added message and stack directly.