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.
If you issue a search, then issue another search before the first has completed, Brim will abort the fetch request of the first. This usually throws an error with the message:
DOMException: the user aborted the request
. However, in our app, we don't want to consider that an error case, since it's clearly what the user wanted to do. However, the error was still being thrown because we were not checking for the abort message in all three places an error can happen in a search:Previously, we were only checking one of those places for the abort error and skipping the error. Now I've made a single
errored
function that we use in all three places.This will fix: #1152
I also inlined the callbacks to make it all more readable. I think it's better than scrolling up just to see what the handler does.