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

Update custom image request to handle error event #2902

Conversation

PikachuEXE
Copy link
Collaborator

Update custom image request to handle error event

Pull Request Type

  • Bugfix
  • Feature Implementation
  • Documentation
  • Other

Related issue

Improves #2498

Description

Javascript errors are thrown in main process (not renderer process) so the annoying dialog sometimes appears for network errors, e.g. #2498 (comment)
This PR updates the FT imagecache implementation to catch request error event and log it to console, preventing the annoying dialog to appear

Doc for request error event:
https://www.electronjs.org/docs/latest/api/client-request#event-error

Screenshots

Dialog example
image

Testing

Desktop

  • OS: MacOS
  • OS Version: 12.6.1
  • FreeTube version: fc5be5b

Additional context

I tested this for a week before submitting this PR

@github-actions github-actions bot added the PR: waiting for review For PRs that are complete, tested, and ready for review label Nov 30, 2022
@FreeTubeBot FreeTubeBot enabled auto-merge (squash) November 30, 2022 01:49
Copy link
Member

@absidue absidue left a comment

Choose a reason for hiding this comment

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

Personally I've never seen that network error dialog, however as the code looks good and everyone else seems to be getting these errors, I'll happily approve this PR.

@FreeTubeBot FreeTubeBot merged commit deb463e into FreeTubeApp:development Nov 30, 2022
@github-actions github-actions bot removed the PR: waiting for review For PRs that are complete, tested, and ready for review label Nov 30, 2022
@PikachuEXE PikachuEXE deleted the fix/reduce-disk-usage--remove-request-error-dialog branch December 1, 2022 02:36
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.

5 participants