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

Log error inside of rescue_from block of BatchItemProcessingJob #131

Open
afred opened this issue Feb 21, 2019 · 0 comments
Open

Log error inside of rescue_from block of BatchItemProcessingJob #131

afred opened this issue Feb 21, 2019 · 0 comments

Comments

@afred
Copy link
Member

afred commented Feb 21, 2019

Background: the method BatchItemProcessingJob#rescue_from will execute if there's an exception raised at some point during the deserialization process. Errors can occur for a variety of reasons, one of which is a faulty connection to the database.

In such case, the BatchItem will not be retrievable (and will end up being nil), which causes batch_item.update to raise a subsequent error, and we never get to see the message inside of exception.message.

Done when: we call Rails.logger.warn exception.message inside of BatchItemProcessingJob#rescue_from before the call to batch_item.update.

Or... we need to at least log exception.message in a place where we'll find it if we go looking. I would think the most obvious place would be the Rails log.. but open to suggestions.

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

No branches or pull requests

1 participant