What does this "LuaWebService error" mean?

I’m writing the market aspects of my game, and I saw this little error in the server logs:

What does this error mean? How can I handle the error and retry the request?

Here’s what the code that’s causing the error look like.

NOTE: PlayerAdded is fired when the game finishes initializing a player upon joining. C_Player is a custom wrapped player object, since the game has a few custom functions and properties it assigns to the custom wrapped player object. Player is the regular, non wrapped player object.

shared.DragonEngine.My.Services.PlayerService.PlayerAdded.Event:connect(function(PlayerName)
		local C_Player=PlayerService:GetPlayer(PlayerName)
		local Player=game.Players[PlayerName]
		C_Player.OwnedGamePasses.x2Coins=GamePassService:PlayerHasPass(Player,873893098)
		C_Player.OwnedGamePasses.x2XP=GamePassService:PlayerHasPass(Player,8996326020)
		C_Player.OwnedGamePasses.Radio=GamePassService:PlayerHasPass(Player,957539508)
end)

The “LuaWebService” error appears to occur when checking if a player has a gamepass with GamePassService.

This is because the game server’s Lua request errors your request back.

Imagine it like an Internal HttpService Error. It basically means that your request returned an error from the server.

…In this particular case - are these definitely gamepasses, and not dev products? Support for checking Dev Products is no longer supported.

If these are gamepasses, I’d reccomend using pcall around the ::PlayerHasPass() method.

Example:

local success,PlayerOwnsPassNamePass = pcall(function()
     return GamePassService:PlayerHasPass(Player,1)
end)
C_Player.OwnedGamePasses[PassName] = success and PlayerOwnsPassNamePass or success

This code basically means, in the case of an error, your code will assume the Player doesn’t own the pass (fails safe) and continues as normal.

3 Likes

So this is ROBLOX having internal web issues, gotcha.

I didn’t know what the error was specifying, so I didn’t want to pcall it until I knew exactly what was going wrong.

Thanks!

3 Likes