Updated indexing response error handler #122
Merged
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.
Fix some issues found during testing with the response and exception not being handled by the correct case; also sends some error metrics to datadog.
Uses
IsValid
on response to determine if the request was successful or not. With exceptions, it was messy to figure out which cases should be handled or not. (Other requests like creating indices still use exceptions; in those cases, every error should be considered fatal)In the event of an error,
ServerError
may or may not be set depending on what and which stage in the server's processing pipeline an error was triggered.ItemsWithErrors
will generally be empty if the processing doesn't get to the index level.Closed indices will result in either
index_closed_exception
orcluster_block_exception
in the return response items.Waiting for a server to come back online is removed and waiting for the option to re-queue items without failing them and depleting all the retries. ppy/osu-queue-processor#16
requires