local ProductInfo = MarketplaceService:GetProductInfo(Recibo.ProductId, Enum.InfoType.Product)
… aborted the script with this error…
… but this happened only one time, and inside Studio.
As in the official documentation there is no mention of the need for a pcall for this command, I ask here if I really need to do a special treatment here, in case this error occurs again in a production environment.
Also, i havent researched on the error but it just may also be an internal error or something, just wait it out and try as well as with the pcall to suppress errors
Yes, yes, pcalls are surely cool and useful. But technically speaking here, apart from the fact that it could be a Roblox internal error and it may be fixed as I’m typing this, is your internet connection stable?
function GetProductInfo(ProductId)
local ProductInfo
for i = 1, 7 do -- 7 attempts/ 7 seconds
local Success, Error = pcall(function()
ProductInfo = MarketplaceService:GetProductInfo(ProductId, Enum.InfoType.Product)
end)
if Success then return ProductInfo end
wait(1)
end
warn('Error GetProductInfo(' .. ProductId .. '): ' .. Error)
end