I am currently using the cloudscript below to send friend requests.
handlers.SendFriendRequest = function (args, context) { server.AddFriend({ PlayFabId: currentPlayerId, FriendPlayFabId: args.FriendPlayFabId }); server.SetFriendTags({ PlayFabId: currentPlayerId, FriendPlayFabId: args.FriendPlayFabId, Tags: ["requestee"] }); server.AddFriend({ PlayFabId: args.FriendPlayFabId, FriendPlayFabId: currentPlayerId }); server.SetFriendTags({ PlayFabId: args.FriendPlayFabId, FriendPlayFabId: currentPlayerId, Tags: ["requester"] }); };
I would like to receive some sort of error if the args.FriendPlayFabId is invalid so that I can alert the user. How can I do this? I don't currently get any errors back from the ExecuteCloudScriptResult when inputting an invalid playfab id.