Debug: Instrumentierung für isBigNumber-Fehler (Console-Log + Fetch)

This commit is contained in:
root committed 2026-02-07 08:58:09 +00:00
1 parent 80c03411ae
commit 37327cc2c8
2 files changed
+38 -12

No files matched your search

+27 -11
View File
@@ -37,15 +37,31 @@ export type ContactFormData = {
export async function createContactDocument(data: ContactFormData) {
if (!_databases) _databases = getDatabases();
return _databases.createDocument<ContactFormData>(
CONTACT_DATABASE_ID,
CONTACT_COLLECTION_ID,
ID.unique(),
{
name: data.name,
email: data.email,
company: data.company,
message: data.message,
}
);
const docId = ID.unique();
// #region agent log
fetch('http://localhost:7243/ingest/8d1383cf-9102-464e-a10c-b6b8ee60ecff',{method:'POST',headers:{'Content-Type':'application/json'},body:JSON.stringify({location:'appwrite.ts:createContactDocument',message:'before createDocument',data:{docId},timestamp:Date.now(),hypothesisId:'C'})}).catch(()=>{});
// #endregion
try {
const result = await _databases.createDocument<ContactFormData>(
CONTACT_DATABASE_ID,
CONTACT_COLLECTION_ID,
docId,
{
name: data.name,
email: data.email,
company: data.company,
message: data.message,
}
);
// #region agent log
fetch('http://localhost:7243/ingest/8d1383cf-9102-464e-a10c-b6b8ee60ecff',{method:'POST',headers:{'Content-Type':'application/json'},body:JSON.stringify({location:'appwrite.ts:createContactDocument',message:'createDocument resolved',data:{}},timestamp:Date.now(),hypothesisId:'A'})}).catch(()=>{});
// #endregion
return result;
} catch (e) {
// #region agent log
const errObj = e instanceof Error ? { message: e.message, stack: e.stack, name: e.name } : { message: String(e) };
fetch('http://localhost:7243/ingest/8d1383cf-9102-464e-a10c-b6b8ee60ecff',{method:'POST',headers:{'Content-Type':'application/json'},body:JSON.stringify({location:'appwrite.ts:createContactDocument catch',message:'createDocument rejected',data:errObj,timestamp:Date.now(),hypothesisId:'A,B,C,D,E'})}).catch(()=>{});
// #endregion
throw e;
}
}