Why do I keep receiving this "HTTP 400 (Bad Request)" error?


Hello developers,
I check my console every once in a while in my game, and I keep seeing this error, it says there is a HTTP 400 bad request? I checked that specific line, and it’s the filtering thing.


How the script (that has the error) works is by, getting the string to get filtered, which is a string a player put, onto their leaderstats.

Anyone know why am I receiving this?

Can you send the leaderstats script? we can’t really solve it if not.

LeaderstatsEvent.OnServerEvent:Connect(function(player, namebox)
	local stringvalue = player:WaitForChild("leaderstats"):WaitForChild("Glove")
	local message = namebox
	local filteredMessage = game:GetService("Chat"):FilterStringForBroadcast(message, player)
	
	if namebox == "" then
		stringvalue.Value = "N/A"
	else
		stringvalue.Value = filteredMessage
	end 
end)

400 will return an error if there’s a problem on your end.

This is a server script, and it displays in the server console if a player puts a new leaderstats name.

But, is it best to use pcall()?

Are you sure “namebox” isnt nil and a string is actually being passed? Thats probably what would cause an HTTP 400 error – maybe try printing the message to make sure it’s not invalid in some way