Capture more errors in LoadUrnsJob to avoid "false positive" harvest reporting #40
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Ref https://github.com/harvard-lts/CURIOSity/issues/215
Summary
There was a small section in the harvest logic where errors were not being captured and handled. If an error was thrown somewhere in this section, it would cause the initial
PerformHarvestsJob
to fail. This failed job would then retry itself several times, failing silently all the way. And because the errors weren't being captured, no information would be visible to the user looking in modal in the "Recent indexing activity" section of the Exhibit Dashboard.This PR includes two key changes:
Capturing the error prevents the job from retrying itself over and over. This frees up the background working to work on other processes.
Handling the error means bubbling it up to the user, specifically in the harvest status modal. This lets the user know 1) something went wrong and 2) possibly what they can do about it.
Screenshots
Before
After
Testing Instructions
Please refer to the ticket.