legendary icon indicating copy to clipboard operation
legendary copied to clipboard

Unexpected HTTP status code (429) crashes legendary

Open hxka opened this issue 3 years ago • 3 comments

Here are two outputs of legendary status, one a few minutes after another:

$ legendary status
[Core] WARNING: Checking for EOS Overlay updates failed: HTTPError('429 Client Error: Too Many Requests for url: https://launcher-public-service-prod06.ol.epicgames.com/launcher/api/public/assets/v2/platform/Windows/namespace/302e5ede476149b1bc3e4fe6ae45e50e/catalogItem/cc15684f44d849e89e9bf4cec0508b68/app/98bc04bc842e4906993fd6d6644ffb8d/label/Live')
[Core] INFO: Trying to re-use existing login session...
Traceback (most recent call last):
  File "/usr/bin/legendary", line 33, in <module>
    sys.exit(load_entry_point('legendary-gl==0.20.29', 'console_scripts', 'legendary')())
  File "/usr/lib/python3.10/site-packages/legendary/cli.py", line 2991, in main
    cli.status(args)
  File "/usr/lib/python3.10/site-packages/legendary/cli.py", line 1505, in status
    games_available = len(self.core.get_game_list(update_assets=not args.offline))
  File "/usr/lib/python3.10/site-packages/legendary/core.py", line 395, in get_game_list
    return self.get_game_and_dlc_list(update_assets=update_assets, platform=platform)[0]
  File "/usr/lib/python3.10/site-packages/legendary/core.py", line 409, in get_game_and_dlc_list
    self.get_assets(update_assets=update_assets, platform=_platform)
  File "/usr/lib/python3.10/site-packages/legendary/core.py", line 355, in get_assets
    self.egs.get_game_assets(platform=platform)
  File "/usr/lib/python3.10/site-packages/legendary/api/egs.py", line 165, in get_game_assets
    r.raise_for_status()
  File "/usr/lib/python3.10/site-packages/requests/models.py", line 1021, in raise_for_status
    raise HTTPError(http_error_msg, response=self)
requests.exceptions.HTTPError: 429 Client Error: Too Many Requests for url: https://launcher-public-service-prod06.ol.epicgames.com/launcher/api/public/assets/Windows?label=Live
$ legendary status
[Core] WARNING: Checking for EOS Overlay updates failed: HTTPError('503 Server Error: Service Temporarily Unavailable for url: https://launcher-public-service-prod06.ol.epicgames.com/launcher/api/public/assets/v2/platform/Windows/namespace/302e5ede476149b1bc3e4fe6ae45e50e/catalogItem/cc15684f44d849e89e9bf4cec0508b68/app/98bc04bc842e4906993fd6d6644ffb8d/label/Live')
[Core] INFO: Trying to re-use existing login session...
Epic account: dopamine hitman
Games available: 244
Games installed: 3
EGL Sync enabled: False
Config directory: /home/hxka/.config/legendary
Platform (System): Linux-5.19.12-arch1-1-x86_64-with-glibc2.36 (posix)

Legendary version: 0.20.29 - "Dark Energy (hotfix #3)"
Update available: no

As you can see, legendary handles 503 returned by Epic servers gracefully, but crashes when it receives 429.

hxka avatar Oct 05 '22 20:10 hxka

Yes that is intentional. Server errors are generally just warnings, but client errors indicate something's wrong on the client side, so they are hard fails.

derrod avatar Oct 05 '22 20:10 derrod

Well, that's still a problem, as the next invocation of legendary would try to check for updates again, receive the same error, and crash again. In this case it made Heroic completely unusable - it kept executing legendary and it kept crashing.

hxka avatar Oct 05 '22 20:10 hxka

http 429 is not a sorta a client error being the client has sent too many requests, but it's not a sorta thing that legendary has caused unless there was a big amount of requests which in this case no unless it was more widespread. Maybe wait 24 hours or so.

nutterthanos avatar Oct 05 '22 22:10 nutterthanos