frappe.exceptions.ValidationError: Failed to get method for command form-input with 'form-input'

“in frappe builder”

document.addEventListener(“DOMContentLoaded”, function () {
document.getElementById(“myBotton”).addEventListener(“click”, function ()
var name1 = “mccccyrecord”;
var email = “laccfft@g.com”;
var payload = {
“name1”: name1,
“email”: email
};
fetch(“/api/method/app.web.web.doctype.test.form-input”, {
method: “POST”,
// headers: { “Content-Type”: “application/json” },
body: JSON.stringify(payload),
})
.then((response) => response.json())
.then((data) => {
console.log(data);
})
.catch((error) => {
console.error(“Error:”, error);
});
});
});
i write this code in clint side
(server side)
request_args = frappe.form_dict
new_user = frappe.new_doc(“User”)
new_user.update({
“email”: request_args.get(“email”),
“name1”: request_args.get(“name1”)
})
new_user.insert()
frappe.db.commit()
frappe.response[“message”] = new_user i write this code in server side “using sever script” i have this error “”“”“”“”“”“”“”“ValidationError: Failed to get method for command form-input with 'form-input”“”“”“”“”“”“”“”“”“” how to solve this