Add --ignore-file-not-found option to ignore HTTP not found errors downloading file attachments from Slack #27
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.
This is a replacement for #21 . Not all attachments are images, so I have decided to not substitute not found files with a fallback image.
Instead, provide the option to deal with the situation in a manner similar to #20, that concerns files deleted from Slack before doing the export. In that case, we simply log a warning and continue.
This is potentially a more severe situation, so we want to give the user the ability to investigate further. The default behavior therefore stays as before, we raise an HTTPError after the failed download via
raise_for_status()
. But give a somewhat more meaningful error msg, including pointing out to the user that they can override this behavior (and achieve similar behavior to the deleted file case) via the command line option--ignore-file-not-found
.I have identified and replicated two situations in which this scenario can occur: