Skip to content
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

Undefined method unhandled_error for nil #1485

Closed
coorasse opened this issue Sep 12, 2024 · 3 comments · Fixed by #1486
Closed

Undefined method unhandled_error for nil #1485

coorasse opened this issue Sep 12, 2024 · 3 comments · Fixed by #1486

Comments

@coorasse
Copy link

coorasse commented Sep 12, 2024

See the following:
CleanShot 2024-09-12 at 10 12 27@2x

This errors is happening when using an inline adapter. I am not sure how result can be nil, but I happy to provide more information.

GoodJob version: 4.2.1
Rails version: 7.1.4
Ruby version 3.3.5

@Earlopain
Copy link
Collaborator

Looks like something outside of the job itself is raising with then causes the result to be nil, and the ensure itself raising shadows the actual error.

Can you make the following edit? 2921c44 bundle open good_job will help. This should show what is actually going wrong here

@coorasse
Copy link
Author

Yes, with this change I can now see the original error 👍
CleanShot 2024-09-12 at 14 49 41@2x

Earlopain added a commit to Earlopain/good_job that referenced this issue Sep 12, 2024
`Gem::LoadError` does not inherit from `StandardError` and as such won't be rescued.
Just let it bubble up.

Closes bensheldon#1485
Earlopain added a commit to Earlopain/good_job that referenced this issue Sep 12, 2024
`Gem::LoadError` does not inherit from `StandardError` and as such won't be rescued.
Just let it bubble up.

Closes bensheldon#1485
@Earlopain
Copy link
Collaborator

Right, so I guess your job creates an attachment somewhere, and that attachment has some variant(s). That functionality does require this gem and it autoloaded only once actually accessed.

I openend #1486 to show the proper error message by default.

Earlopain added a commit to Earlopain/good_job that referenced this issue Sep 12, 2024
`Gem::LoadError` does not inherit from `StandardError` and as such won't be rescued.
Just let it bubble up.

Closes bensheldon#1485
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Development

Successfully merging a pull request may close this issue.

2 participants