fjaros / wowchat

WoWChat is a clientless Discord integration chat bot for old versions of World of Warcraft.
GNU General Public License v3.0
139 stars 96 forks source link

Crash in checkNewVersion when GitHub returns 403 #108

Closed nerestaren closed 11 months ago

nerestaren commented 11 months ago

I guess GitHub banned me after frequent reconnects, but the program should not crash when GitHub is inaccessible.

15:33:54.369 INFO  wowchat.WoWChat$ - Running WoWChat - v1.3.8
Exception in thread "main" java.io.IOException: Server returned HTTP response code: 403 for URL: https://api.github.com/repos/fjaros/wowchat/releases/latest
        at java.base/sun.net.www.protocol.http.HttpURLConnection.getInputStream0(HttpURLConnection.java:1924)
        at java.base/sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1520)
        at java.base/sun.net.www.protocol.https.HttpsURLConnectionImpl.getInputStream(HttpsURLConnectionImpl.java:250)
        at java.base/java.net.URL.openStream(URL.java:1165)
        at scala.io.Source$.fromURL(Source.scala:144)
        at scala.io.Source$.fromURL(Source.scala:134)
        at wowchat.WoWChat$.checkForNewVersion(WoWChat.scala:81)
        at wowchat.WoWChat$.main(WoWChat.scala:28)
        at wowchat.WoWChat.main(WoWChat.scala)
fjaros commented 11 months ago

Fixed in https://github.com/fjaros/wowchat/commit/87ccb320d1a1383b7b088c0acbf36715e19cfa67