Handle HTTP error code exceptions
ArmandAgopian opened this issue ยท 4 comments
I was joining a server which was trying to load a txt file from a website which the bandwidth limit exceeded, returned error code 500. p455w0rdslib crashed because it didn't know how to handle it.
[00:17:35] [TheRealp455w0rd Contributors DL Thread/INFO]: [p455w0rdslib.util.ContributorUtils$DLThread:run:328]: java.io.IOException: Server returned HTTP response code: 500 for URL: <hidden for safety>
[00:17:35] [TheRealp455w0rd Contributors DL Thread/INFO]: [p455w0rdslib.util.ContributorUtils$DLThread:run:328]: at sun.net.www.protocol.http.HttpURLConnection.getInputStream0(HttpURLConnection.java:1839)
[00:17:35] [TheRealp455w0rd Contributors DL Thread/INFO]: [p455w0rdslib.util.ContributorUtils$DLThread:run:328]: at sun.net.www.protocol.http.HttpURLConnection.access$200(HttpURLConnection.java:90)
[00:17:35] [TheRealp455w0rd Contributors DL Thread/INFO]: [p455w0rdslib.util.ContributorUtils$DLThread:run:328]: at sun.net.www.protocol.http.HttpURLConnection$9.run(HttpURLConnection.java:1432)
[00:17:35] [TheRealp455w0rd Contributors DL Thread/INFO]: [p455w0rdslib.util.ContributorUtils$DLThread:run:328]: at sun.net.www.protocol.http.HttpURLConnection$9.run(HttpURLConnection.java:1430)
[00:17:35] [TheRealp455w0rd Contributors DL Thread/INFO]: [p455w0rdslib.util.ContributorUtils$DLThread:run:328]: at java.security.AccessController.doPrivileged(Native Method)
[00:17:35] [TheRealp455w0rd Contributors DL Thread/INFO]: [p455w0rdslib.util.ContributorUtils$DLThread:run:328]: at java.security.AccessController.doPrivileged(AccessController.java:713)
[00:17:35] [TheRealp455w0rd Contributors DL Thread/INFO]: [p455w0rdslib.util.ContributorUtils$DLThread:run:328]: at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1429)
[00:17:35] [TheRealp455w0rd Contributors DL Thread/INFO]: [p455w0rdslib.util.ContributorUtils$DLThread:run:328]: at p455w0rdslib.util.ContributorUtils$DLThread.run(ContributorUtils.java:316)
what url is it reporting? if it's anything other than amazon, you are not on the latest...and I have unlimited bandwidth from them, and i tested in 1.10.2 and 1.12.2 and it's working fine
Upon further investigation, it looks like the error is on my end. I updated through Twitch, and although it said it was the latest version, it didn't actually update the file itself. Manually updated and made sure it's the latest version, and the problem is fixed.