Skip to content

Don't log expected reconstruction 416 as a failed api call - #939

Draft
assafvayner wants to merge 2 commits into
mainfrom
no-log-expected-416
Draft

Don't log expected reconstruction 416 as a failed api call#939
assafvayner wants to merge 2 commits into
mainfrom
no-log-expected-416

Conversation

@assafvayner

Copy link
Copy Markdown
Contributor

Downloads walk a file by requesting successive reconstruction segments until the server answers 416 (Range Not Satisfiable), so that 416 is the normal end-of-file signal rather than a failure. It was still routed through process_error, which logged "... api call failed ..." at info level for every completed file download.

  • 416 with with_expected_416() now logs a single debug line (Reached end of reconstruction) and skips the failure-worded process_error path; the caller still gets the same fatal, non-retried error that get_reconstruction_impl converts to Ok(None).
  • Added test_416_expected_is_fatal_and_not_logged_as_failure, which asserts no ERROR/WARN and no "api call failed" line is emitted.

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