[Bug] Launcher ignores HTTP code
moonexpr opened this issue · 1 comments
UI or Mechanical Bug?
Mechanical bug
Describe the bug
Upon initial loading of the launcher, the application attempts a GET request to the aforementioned resource. However, this the server returns HTTP 404 along side the respective HTML error document. The launcher seems to attempt to parse the document's content resulting in the the application throwing an exception; the exception appears within the main.log file respectively.
TL;DR The launcher ignores the HTTP 404 from "fastdl.creators.tf" and attempts to parse the HTML content, then goes to "raw.githubusercontent.com" which appears to succeed.
To Reproduce
Steps to reproduce the behavior:
- Open the launcher
- Go to settings
- Click on the log folder
- Open main.log
- Scroll to the bottom
Expected behavior
The launcher should abort when HTTP status code 4xx is received by a host.
Launcher Logs
[28-05-2021] [11:19:00T-05:00] -- [browser] -- [info] -- Loaded pre existing config
[28-05-2021] [11:19:00T-05:00] -- [browser] -- [info] -- Current launcher version: 0.2.1
[28-05-2021] [11:19:00T-05:00] -- [browser] -- [info] -- Checking for updates.
[28-05-2021] [11:19:00T-05:00] -- [browser] -- [info] -- Basic System Information: [platform: linux, release: 5.11.0-17-generic, arch: x64, systemmem: 15.62 gb]
[28-05-2021] [11:19:00T-05:00] -- [browser] -- [info] -- Launcher was opened/finished initialization.
[28-05-2021] [11:19:00T-05:00] -- [browser] -- [info] -- Checking for modlist updates
[28-05-2021] [11:19:00T-05:00] -- [browser] -- [info] -- Trying to get mod list from: https://fastdl.creators.tf/launcher/mods.json
[28-05-2021] [11:19:00T-05:00] -- [browser] -- [info] -- Trying to get mod list from: https://raw.githubusercontent.com/ampersoftware/Creators.TF-Community-Launcher/master/internal/mods.json
[28-05-2021] [11:19:00T-05:00] -- [browser] -- [error] -- Failed to parse json in TryGetModList request for https://fastdl.creators.tf/launcher/mods.json, error: SyntaxError: Unexpected token < in JSON at position 0
[28-05-2021] [11:19:00T-05:00] -- [browser] -- [info] -- Local mod list version: 1.34, Remote mod list version: 1.34.
[28-05-2021] [11:19:02T-05:00] -- [browser] -- [info] -- Set current mod to: Creators.TF Events Servers
[28-05-2021] [11:19:03T-05:00] -- [browser] -- [info] -- Set current mod to: Creators.TF
[28-05-2021] [11:19:04T-05:00] -- [browser] -- [info] -- Loading Settings window...
Desktop (please complete the following information):
- OS: Ubuntu 21.04 [hirsute]
- Kernel: x86_64 Linux 5.11.0-17-generic
- Desktop Environment: GNOME 3.38.5
- Shell: fish 3.1.2
Fixed. Feel free to reopen this issue if it happens again.