GameWispAPIv1::Bad JSON Error



PhantomBot Version:
OS Version: macOS 10.2.5
Java Version: 1.8.0_144
Browser and Version: not supported browser
Stock PhantomBot: Yes
Any Recent Changes to Your System: No

Description of Issue:
This is what I see in console every other time I start bot. I used fresh original copy of PhantomBot (with my botlogin.txt) for this test.

Console logs:
SingularityWS (GameWisp): Connected and Ready for Requests

[ERROR] [readJsonFromUrl()] GameWispAPIv1::Bad JSON (,user,tier): <html>
<head><title>502 Bad Gateway</title></head>
<body bgcolor="white">
<center><h1>502 Bad Gat...


Bad Gateway indicates that their service may be down at this time and you are not routing there. 502 is returned by a server, not the client (PhantomBot). It can also be a proxy/CloudFlare issue on their side and is localized to an area.

502 Bad Gateway


Just verified, it is working from my location:

[04-11-2018 @ 15:06:09.897 MDT] [DEBUG] [onEvent()] Dispatched event IrcChannelUserModeEvent
[04-11-2018 @ 15:06:10.105 MDT] [DEBUG] [checkGameWispSub()@gameWispHandler.js:186] checkGameWispSub(illusionarybot): {"result":{"message":"Subscribers Retrieved","status":1},"_success":true,"_exception":"","data":[],"_exceptionMessage":"","_type":"GET","_url":",user,tier","_http":200,"_content":" {\"result\":{\"status\":1,\"message\":\"Subscribers Retrieved\"},\"data\":[]}"}


Yes, I understand, I have this error from time to time, not every time. It would be great if this error had a more concise appearance in the console. This is not a claim, just a wish :slight_smile:


Nothing more we can say, we trap the HTML back from GameWisp and always expect JSON. We cannot code to expect anything outside of the API response as that is not within GameWisp’s control. There are too many variables, so we trap that it is “Bad JSON.”


This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.