Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Download copy error logging #2556

Merged
merged 4 commits into from
Dec 17, 2024
Merged

Download copy error logging #2556

merged 4 commits into from
Dec 17, 2024

Conversation

bjtitus
Copy link
Contributor

@bjtitus bjtitus commented Dec 16, 2024

  • Moves non-throwing code out of the do/catch block so it's clear which code is throwing
  • Adds error logging when we fail to copy the downloaded file. This is the point at which we show an error message saying "have you run out of space", which may not be accurate depending on the error.

To test

  • Ensure episode downloads still work
  • In StorageManager.copyItem(at: URL, to: URL) you can add the following: throw CocoaError(.fileNoSuchFile) and ensure this error is logged when downloading:
DownloadManager: Failed to copy downloaded file from location: <path> to destination: <path>  error: Error Domain=NSCocoaErrorDomain Code=4 "The file doesn’t exist."

Checklist

  • I have considered if this change warrants user-facing release notes and have added them to CHANGELOG.md if necessary.
  • I have considered adding unit tests for my changes.
  • I have updated (or requested that someone edit) the spreadsheet to reflect any new or changed analytics.

We've received user reports that this copy fails even when there is enough space free. This error should hopefully help us narrow it down a bit further.
@bjtitus bjtitus added the Logging Additions to logging and debugging tooling label Dec 16, 2024
@bjtitus bjtitus added this to the 7.80 milestone Dec 16, 2024
@bjtitus bjtitus requested a review from a team as a code owner December 16, 2024 16:14
@bjtitus bjtitus requested review from SergioEstevao and removed request for a team December 16, 2024 16:14
Copy link
Contributor

@SergioEstevao SergioEstevao left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:shipit:

@bjtitus bjtitus enabled auto-merge December 17, 2024 20:30
@bjtitus bjtitus merged commit 9e7f989 into trunk Dec 17, 2024
4 of 6 checks passed
@bjtitus bjtitus deleted the bjtitus/download-error-logging branch December 17, 2024 21:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Logging Additions to logging and debugging tooling
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants