RainbowCookie32 / rusty-psn

A GUI/CLI tool for downloading PS3 and PS4 game updates
MIT License
362 stars 16 forks source link

Fix error information about incorrect title id suggesting there are no updates available #238

Closed sarpt closed 2 months ago

sarpt commented 2 months ago

When experimenting with title id changes I've noticed that when providing incorrect title id, the error presented suggest that there are no updates available instead of informing that the title id itself is incorrect: image

The fix takes into account a response in form of <Error><Code>...</Code><Error> tags which are returned with a text "NoSuchKey" in response when requesting the psn backend with an incorrect title id: image

Although I couldn't trigger a case with only <Error> or only <Code> tags without the other, there are warn!s added when such thing might occur. In case some other error is returned as error code instead of "NoSuchKey" there's an additional type of toast/information added.

RainbowCookie32 commented 2 months ago

I think I ran into the element while fixing something else and assumed I had fucked up something about error detection for no updates. Should've checked what the xml actually said lol.

Thanks for the fix!