使用API​​时内部服务器错误500

时间:2015-11-11 22:45:05

标签: java api debugging

我不确定这是否是正确的地方,但是,

今天我使用流行的游戏API(Riot Games - League of Legends)制作了一个程序,我只是做了简单的调用来做类似的事情

Exception in thread "main" com.robrua.orianna.type.exception.APIException: A INTERNAL_SERVER_ERROR (500) error was received from the server for URI https://global.api.pvp.net/api/lol/static-data/na/v1.2/mastery?api_key=b6121770-0eb0-4d59-9bfd-2a362b1d337b&masteryListData=all
    at com.robrua.orianna.api.dto.BaseRiotAPI.get(BaseRiotAPI.java:230)
    at com.robrua.orianna.api.dto.BaseRiotAPI.get(BaseRiotAPI.java:163)
    at com.robrua.orianna.api.dto.StaticDataAPI.getMasteries(StaticDataAPI.java:124)
    at com.robrua.orianna.api.dto.BaseRiotAPI.getMasteries(BaseRiotAPI.java:402)
    at com.robrua.orianna.api.core.StaticDataAPI.getMasteries(StaticDataAPI.java:332)
    at com.robrua.orianna.api.core.StaticDataAPI.getMasteries(StaticDataAPI.java:374)
    at com.robrua.orianna.api.core.RiotAPI.getMasteries(RiotAPI.java:565)
    at com.robrua.orianna.api.core.SummonerAPI.getMasteryPagesByID(SummonerAPI.java:85)
    at com.robrua.orianna.api.core.SummonerAPI.getMasteryPagesByID(SummonerAPI.java:97)
    at com.robrua.orianna.api.core.SummonerAPI.getMasteryPagesByID(SummonerAPI.java:106)
    at com.robrua.orianna.api.core.SummonerAPI.getMasteryPages(SummonerAPI.java:55)
    at com.robrua.orianna.api.core.RiotAPI.getMasteryPages(RiotAPI.java:610)
    at APIUtil.printMasteryPages(APIUtil.java:38)
    at APIDrv.main(APIDrv.java:14)

现在当我在一个单独的类中转到我的main方法并创建一个APIUtil对象并调用printMasteryPages方法时,我的输出中只得到无效的500&?

$sql = "INSERT INTO `steam_users` (`SteamID`,`PersonaName`,`Avatar`,`AvatarMedium`,`AvatarFull`) VALUES ('$steamID','$personaName','$avatar','$avatarMedium','$avatarFull')";

今天早些时候这是有效的。我不希望任何人特别熟悉API,但是导致内部500的原因是什么?至于我用Google搜索它显然是服务器端问题而不是客户端?意思是他们的api刚刚下降或什么?

任何见解都会很棒, 谢谢!

1 个答案:

答案 0 :(得分:0)

500错误是服务器端错误。您可以通过服务器设置启用其他输出(如果您有权访问)。