Entfernen: Debug-Instrumentierung (localhost:7243) aus Contact und Appwrite

This commit is contained in:
root
2026-02-07 09:17:47 +00:00
parent e3269518bd
commit 8fa7c2c078
2 changed files with 11 additions and 38 deletions

View File

@@ -30,25 +30,14 @@ const Contact = () => {
const handleSubmit = async (e: React.FormEvent) => {
e.preventDefault();
setIsSubmitting(true);
// #region agent log
fetch('http://localhost:7243/ingest/8d1383cf-9102-464e-a10c-b6b8ee60ecff',{method:'POST',headers:{'Content-Type':'application/json'},body:JSON.stringify({location:'Contact.tsx:handleSubmit',message:'submit started',data:{hasFormData:!!formData},timestamp:Date.now(),hypothesisId:'E'})}).catch(()=>{});
// #endregion
try {
await createContactDocument(formData);
// #region agent log
fetch('http://localhost:7243/ingest/8d1383cf-9102-464e-a10c-b6b8ee60ecff',{method:'POST',headers:{'Content-Type':'application/json'},body:JSON.stringify({location:'Contact.tsx:handleSubmit',message:'createContactDocument resolved',data:{},timestamp:Date.now(),hypothesisId:'A'})}).catch(()=>{});
// #endregion
toast({
title: "Nachricht gesendet!",
description: "Wir melden uns innerhalb von 24 Stunden bei Ihnen.",
});
setFormData({ name: "", email: "", company: "", message: "" });
} catch (err) {
// #region agent log
const errObj = err instanceof Error ? { message: err.message, stack: err.stack, name: err.name } : { message: String(err) };
fetch('http://localhost:7243/ingest/8d1383cf-9102-464e-a10c-b6b8ee60ecff',{method:'POST',headers:{'Content-Type':'application/json'},body:JSON.stringify({location:'Contact.tsx:handleSubmit catch',message:'createContactDocument rejected',data:errObj,timestamp:Date.now(),hypothesisId:'A,B,C,D,E'})}).catch(()=>{});
if (typeof console !== 'undefined' && err instanceof Error) console.error('[Contact] createContactDocument failed', err.message, err.stack);
// #endregion
const message = err instanceof Error ? err.message : "Speichern fehlgeschlagen.";
toast({
variant: "destructive",