Skip to content

fix(remote_file): do not fail download on cache persistence errors#25

Open
ratazzi wants to merge 1 commit into
masterfrom
fix/remote-file-cache-save-failure
Open

fix(remote_file): do not fail download on cache persistence errors#25
ratazzi wants to merge 1 commit into
masterfrom
fix/remote-file-cache-save-failure

Conversation

@ratazzi

@ratazzi ratazzi commented Jul 15, 2026

Copy link
Copy Markdown
Owner

Summary

remote_file treats a failure to persist the ETag / Last-Modified cache as a fatal error, failing a download that has already completed successfully. These caches are only an optimization for conditional requests — losing them just means the next run re-downloads.

This PR downgrades cache persistence failures (e.g. an unwritable state directory) to warnings:

  • saveEtag errors are caught and logged via logger.warn
  • saveLastModified errors are caught and logged via logger.warn
  • the resource continues and reports the download as successful

Testing

  • zig build passes
  • zig build test passes

ETag / Last-Modified caches are a download optimization only. A failure
to persist them (e.g. an unwritable state dir) previously propagated as
an error and failed an already-successful download. Log a warning and
continue instead.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant