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

[UX] Ignore error message fetching non-existent known-fix json #3701

Merged
merged 2 commits into from
Apr 27, 2024

Conversation

arielj
Copy link
Collaborator

@arielj arielj commented Apr 16, 2024

When trying to download the known-fix file for a game that has no known fixes file, an error is printed in the logs:

(22:28:24) ERROR:   [DownloadManager]:  Downloader: Failed to get headers for https://raw.githubusercontent.com/Heroic-Games-Launcher/known-fixes/main/epic/4656facc740742a39e265b026e13d075-epic.json. 
Error: Error: Request failed with status code 404
(node:184327) UnhandledPromiseRejectionWarning: Error: Failed to get headers
    at downloadFile (/home/ariel/dev/oss/HeroicGamesLauncher/build/electron/main.565caa16.js:21710:13)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
(Use `electron --trace-warnings ...` to show where the warning was created)

Not finding a fixes file is totally harmless and in the majority of cases it is actually expected (there's only like... 50 files in the repo), and the error in the logs confuses users when they are trying to debug an issue with a game not working (they think something was wrong with the game download).

This PR adds a flag to the downloadFile function to allow us to ignore the failure and avoid confusing users.


Use the following Checklist if you have changed something on the Backend or Frontend:

  • Tested the feature and it's working on a current and clean install.
  • Tested the main App features and they are still working on a current and clean install. (Login, Install, Play, Uninstall, Move games, etc.)
  • Created / Updated Tests (If necessary)
  • Created / Updated documentation (If necessary)

@arielj arielj added the pr:ready-for-review Feature-complete, ready for the grind! :P label Apr 16, 2024
@arielj arielj requested review from a team, flavioislima, CommandMC, Etaash-mathamsetty, Nocccer and imLinguin and removed request for a team April 16, 2024 01:34
Co-authored-by: Mathis Dröge <mathis.droege@ewe.net>
@arielj arielj requested a review from CommandMC April 25, 2024 01:06
Copy link
Member

@flavioislima flavioislima left a comment

Choose a reason for hiding this comment

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

lgtm

@arielj arielj merged commit 12c7188 into main Apr 27, 2024
8 of 9 checks passed
@arielj arielj deleted the ignore-know-fixes-failed-request branch April 27, 2024 01:48
@Heroic-Games-Launcher Heroic-Games-Launcher locked and limited conversation to collaborators Apr 27, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
pr:ready-for-review Feature-complete, ready for the grind! :P
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants