Hi! My script is supposed to send a quiz thats filled out locally for the server script to send a webhook with it. Think of it as a feedback form. Anyway, it doesn’t work and keeps returning HTTP 502 (Bad Gateway).
Relevant part of the localscript:
local success = "no"
success = game.ReplicatedStorage.FilteringFunction:InvokeServer(msg1, msg2, msg3, msg4, msg5, host)
if success ~= "no" then
feedbackMain.SendButton.Text = success
feedbackMain:TweenPosition(UDim2.new(0.25, 0,-2, 0),"Out","Quint",0.3,true)
db = false
else
warn(success)
feedbackMain.SendButton.Text = "Error ("..success.."). Trying again!"
task.wait(2)
end
Relevant part of the serverscript:
function filteringFunction.OnServerInvoke(player, msg1, msg2, msg3, msg4, msg5, host)
-- webhook data
local newdata = HTTP:JSONEncode(data)
HTTP:PostAsync(webhook, newdata)
return "Quiz submitted."
end
I’ve tried pcall and some other tweaks (even consulting Mr. AI themselves) and I just keep getting the same error. The webhook is using a reliable (tested) proxy. Plz help!
Side note: The error points to this line success = game.ReplicatedStorage.FilteringFunction:InvokeServer(msg1, msg2, msg3, msg4, msg5, host)