fix: missing permissions during search cancels entire batch job #740
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.
in the case where a guild may have no visible channels, or if the provided list of channels has one where the user cannot access, a given batch job will fail ungracefully, causing all of the remaining queue to be discarded:


i think a more elegant solution here is to return an empty search response, log a warning, and proceed as if the api returned no results (which defaults to exiting, or going to the next job if it is a batch)
testing
this works locally for me to skip jobs with guilds or channels that have insufficient read permissions c:
note: my personal contributions to and usage of this project do not represent discord. opinions are my own