httpError remplace by logError

This commit is contained in:
Linventif 2023-09-25 11:28:15 +02:00
parent 5c66279748
commit 8e2d314fc9

View File

@ -1,12 +1,3 @@
//
// Functions
//
function gmInte.httpError(error)
gmInte.log("Web request failed")
gmInte.log("Error details: "..error)
end
//
// HTTP
//
@ -32,10 +23,12 @@ local function sendHTTP(params)
if (string.sub(code, 1, 1) == "2") then
params.success && params.success(body, code, headers)
else
gmInte.httpError(body)
gmInte.logError("HTTP Request failed with code " .. code .. " and body " .. body)
end
end,
failed = gmInte.httpError,
failed = function(error)
gmInte.httpError(error)
end
})
end