Add a comment for what and why we're rescuing

This commit is contained in:
Issy Long 2024-06-27 12:27:30 +01:00
parent c8504427cb
commit 8c9a6e3379
No known key found for this signature in database

View File

@ -522,7 +522,7 @@ class CurlDownloadStrategy < AbstractFileDownloadStrategy
.flat_map { |headers| [*headers["last-modified"]] }
.filter_map do |t|
t.match?(/^\d+$/) ? Time.at(t.to_i) : Time.parse(t)
rescue ArgumentError
rescue ArgumentError # When `Time.parse` gets a badly formatted date.
nil
end