GameWispAPIv1::Bad JSON Error

gamewisp

#1

PhantomBot Version: 2.4.0.3
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.java:149] GameWispAPIv1::Bad JSON (https://api.gamewisp.com/pub/v1/channel/subscriber-for-channel?access_token=wWXBtkuVD6kpH0PVvll367AedGk8e47XdkJv5PY5&type=twitch&user_name=myHiddenTwitchNameHere&include=anniversaries,user,tier): <html>
<head><title>502 Bad Gateway</title></head>
<body bgcolor="white">
<center><h1>502 Bad Gat...


#2

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

#3

Just verified, it is working from my location:

[04-11-2018 @ 15:06:09.897 MDT] [DEBUG] [onEvent()@ScriptEventManager.java:77] 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":"https://api.gamewisp.com/pub/v1/channel/subscriber-for-channel?type=twitch&user_name=illusionarybot&include=anniversaries,user,tier","_http":200,"_content":" {\"result\":{\"status\":1,\"message\":\"Subscribers Retrieved\"},\"data\":[]}"}

#4

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:


#5

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.”


#6

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