New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
TypeError: Converting circular structure to JSON #442
Comments
Do you have a suggestion on how to implement this? as I understand, this happens because some unhandled exception in user code, it is mostly informing you that you have some unhandled error somewhere. |
Maybe attempt to do As long as it doesn't have any impact on Bull's operation it's not a big deal, but it would be nice to have a more user-friendly error. |
If you are doing an operation that can throw an exception then you should handle that exception, like wrapping it in a try/catch statement. BullMQ wraps your processor in a try/catch already, so topmost exceptions are caught and results in the job failing. My guess is that you are calling that stringify in some callback deeper down the stack, then there is nothing we can do other than what we are already doing, i.e. bring to your attention that you have an unhandled exception somewhere in your code. |
Ah you're probably right, thank you. |
I recently have been seeing a large increase in errors like this:
It's throwing on this line:
bullmq/src/classes/master.ts
Line 121 in c2cfc96
I believe the root cause is an error from Got. Would it be possible to add some kind of check here so circular structures in errors don't cause Bull to crash?
The text was updated successfully, but these errors were encountered: