PCall() is not printing Success

I want to teleport players and i saw this Error in the Developer Console:

Teleport to ReservedServer failed : HTTP 504 (Gateway Time-Out)

But it should just give the pcall the error. Success1 should give me false but it didnt, instead gave me the Gateway Error. What did i do wrong with the PCall?

	if #QuickMatch == 2 then
		if lockedQuickMatch == false then
			lockedQuickMatch = true
			local reserveServer

			local success1 = pcall(function()
				reserveServer = teleportService:ReserveServer(matchGamePlaceId)
			end)

			if success1 == true then
				local success2 = pcall(function()
					teleportService:TeleportToPrivateServer(matchGamePlaceId, reserveServer, QuickMatch)
				end)
				if success2 == true then
					for index, value in pairs(QuickMatch) do	
						table.insert(StartedMatch, value)
						matchBegunRemoteEvent:FireClient(value)
					end
				elseif success2 == false then
					for index, value in pairs(QuickMatch) do
						playRemoteEvent:FireClient(value, "Failed Matchmaking")
					end
				end
			elseif success1 == false then
				for index, value in pairs(QuickMatch) do
					playRemoteEvent:FireClient(value, "Failed Matchmaking")
				end
			end
			table.clear(QuickMatch)
			lockedQuickMatch = false
		end
	end
end
end

teleportService.TeleportInitFailed:Connect(function(player, teleportResult)

	if teleportResult ~= Enum.TeleportResult.Success then
		if table.find(CasualMatch, player) then
			table.remove(CasualMatch, table.find(CasualMatch, player))
		end
		if table.find(QuickMatch, player) then
			table.remove(QuickMatch, table.find(QuickMatch, player))
		end
		if table.find(StartedMatch, player) then
			table.remove(StartedMatch, table.find(StartedMatch, player))
		end
		playRemoteEvent:FireClient(player, "Failed Matchmaking")
	end
end)

pcall() returns success (bool) and error_message (it’s nil if success == true, otherwise string). Maybe try doing local success1, error_message1 = pcall and see if that helps in any way. Optionally you can add an else to your check if success1 is true so that’d mean success1 is false, then warn(error_message) to narrow down the issue.

But if error_message1 gives me a error, success will give me a false so i just need success or?

You technically can just use the success without the error message, but printing it narrows down the issue, take it as good practice. Just print some variables to find exactly which line is causing the problem because sometimes problems are caused by previous lines, not the one erroring. For example a variable is the wrong type or you set up your place permissions improperly. Sometimes it’s a hidden problem like if you have a function call and you want that function to return something. However it’s a dangerous function so you wrap its inside in a pcall which returns the content to the pcall function and not the function that you actually called so you get nil.

I have no idea how to help you (probably because of insufficient information). However I can teach you how to better detect your problem.