TheSilentPro / HeadDB

Provides access to a database of over 100k heads
GNU General Public License v3.0
24 stars 21 forks source link

ignore corrupted json from head provider and continue fetching and pa… #56

Closed gayeed closed 1 year ago

gayeed commented 1 year ago

fix #54 and #55

TheSilentPro commented 1 year ago

This doesn't fix the actual problem which is why it's throwing that exception when that exception should be caught by the try-catch block and fallback provider should be used. I can't reproduce this bug for 2 days the plugin keeps loading fine for me which is why i can't actually debug this myself. I am trying still though it might take a while

gayeed commented 1 year ago

You can try to clear all data the headdb saved and simulate a scene that a head provider returns a wrong json response.Then you will find that the plugin cannot update any data and heads the plugin saves is 0.I met this situation because accessing the https://raw.githubusercontent.com/TheSilentPro/HeadStorage/master/storage(HEAD_STORAGE) failed due to network error and https://heads.pages.dev/archive/humans.json(HEAD_ARCHIVE,fallback provider) returns a corrupted json. This fix ensures that when updating a category responses a corrupted json, other categories update properly.

TheSilentPro commented 1 year ago

Should be done in newest release, check spigot.