You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Throwing DelayedError doesn't work properly with child processor sandboxing, if you don't pass a message to the thrown error. This appears to be because when sending a message to the parent that a child failed, it checks if there's an err.message property, and if not, wraps the error with new Error(err) which causes the name property to be overwritten as Error so that the checks for err.name === 'DelayedError in the Worker class are incorrect.
// my_processor.jsimport{SandboxedJob}from'bullmq';module.exports=async(job: SandboxedJob)=>{// Note the absense of a passed in message herethrownewDelayedError();};
Relevant log output
No response
Code of Conduct
I agree to follow this project's Code of Conduct
The text was updated successfully, but these errors were encountered:
Version
v5.29.1
Platform
NodeJS
What happened?
Description
Throwing
DelayedError
doesn't work properly with child processor sandboxing, if you don't pass amessage
to the thrown error. This appears to be because when sending a message to the parent that a child failed, it checks if there's anerr.message
property, and if not, wraps the error withnew Error(err)
which causes thename
property to be overwritten asError
so that the checks forerr.name === 'DelayedError
in theWorker
class are incorrect.How to reproduce.
Relevant log output
No response
Code of Conduct
The text was updated successfully, but these errors were encountered: