How to handle failed pcalls to Roblox services?

What is the correct behavior when a pcall fails? See the example below:

It is good that we can detect that has been an error, but what to do now? Obviously printing message in the console is not enough.
Shall we do infinite retry until the pcall succeeds? Shall we put something like wait(3) or wait(5) after each retry?
Or shall we retry limited number of times and then show message to the player and kick him?


you should store their purchase for the next time they join and retry it then, or alternatively make an event listener for if they were to buy the game pass.

1 Like