-
Notifications
You must be signed in to change notification settings - Fork 224
using variable inside block of type check leads to "stack level too deep (SystemStackError)" #3373
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
Comments
I saw this issue also. |
well, I tried with the simple plan and it's fine with the plan bolt_3373 {
fail_plan(
'That should fail properly',
'test/failure',
foo => Error('foo'),
)
} That raises exactly the same issue:
Confirmed on MacOS/aarch64 with Bolt 4.0.0. |
I was able to reproduce this bug and did some investigation. The issue occurs due to an infinite recursion during JSON serialization. Here's how it happens:
If you agree with the analysis, I can follow up with a PR to resolve this. Please let me know. (In transparency, I'm personally building a tool that can debug issues. So I've set up the Bolt repo, reproduced the issue, and run my tool. I've traced the code and can confirm the analysis) |
Uh oh!
There was an error while loading. Please reload this page.
Describe the Bug
I've written a catch_error with followup type check to =~ Error exactly like written in the bolt docs "catching errors in plans". If I use the variable inside the block of the type checking the plan crashes with a "stack level too deep (SystemStackError)". The idea is to nest the original error for deeper debugging cases.
Expected Behavior
Plan doesn't crash and returns the defined custom error defined in the
fail_plan
line and is able to include the original error within the new errordetails
hash.Steps to Reproduce
Environment
Additional Context
The text was updated successfully, but these errors were encountered: