[IMPOSSIBLE] Webhook HTTP 525 Error

Hello, currently I am receiving the below error message when I try to send a webhook. I am only having this issue when the webhook is placed in a function rather than directly into the script where it is needed. (The webhook goes to discord using a proxy) I am unsure why I am receiving the HTTP 525 error because I do not receive in other instances.

Script:

function SendAAWebhook(content)
	local payload = HTTP:JSONEncode({
		content,
	})
	HTTP:PostAsync(aawebhook, payload)
end

And here is the other end:

SendAAWebhook("Moderator "..Player.Name.." used **:Sm** with the message '"..Arg2.."'")

However, this works when placed wherever it is needed in the script:

local payload = HTTP:JSONEncode({
									content = "**USER BAN\nPlayer Name: **"..Player.Name.."\n**User ID:** "..Player.UserId.."\n**Action:** Permanent Ban\n**Reason:** "..Arg4,
								})
								HTTP:PostAsync(aawebhook, payload)