Spireblight / STR-Backend

Slay the relics extension
https://dashboard.twitch.tv/extensions/ebkycs9lir8pbic2r0b7wa6bg6n7ua-0.0.1
GNU Affero General Public License v3.0
5 stars 2 forks source link

Return 429 to the client if twtich pubsub API returns 429 #7

Open MaT1g3R opened 1 year ago

MaT1g3R commented 1 year ago

Currently the mod throws this error when we run into a twitch pubsub API rate limit. We should handle that case and return a 429 instead

java.io.IOException: Server returned HTTP response code: 500 for URL: **********
    at sun.net.www.protocol.http.HttpURLConnection.getInputStream0(HttpURLConnection.java:1876)
    at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1474)
    at sun.net.www.protocol.https.HttpsURLConnectionImpl.getInputStream(HttpsURLConnectionImpl.java:254)
    at str_exporter.BackendBroadcaster.broadcastMessage(BackendBroadcaster.java:108)
    at str_exporter.BackendBroadcaster.readQueue(BackendBroadcaster.java:87)
    at str_exporter.BackendBroadcaster.lambda$new$0(BackendBroadcaster.java:36)
    at java.lang.Thread.run(Thread.java:748)01:07:51.325 INFO basemod.BaseMod>