This commit is contained in:
2026-05-28 06:57:54 +02:00
parent 901ab1adae
commit cff72eb528
3 changed files with 15 additions and 19 deletions

View File

@@ -60,22 +60,6 @@ async function adminFetch(path, { method = 'GET', body, queries = [] } = {}) {
error.status = response.status >= 500 ? 500 : response.status
error.code = data?.code
error.type = data?.type
if (response.status === 401 && data?.type === 'user_unauthorized') {
// #region agent log
fetch('http://127.0.0.1:7281/ingest/30e8e71c-b377-4e72-84f9-593826c6d234', {
method: 'POST',
headers: { 'Content-Type': 'application/json', 'X-Debug-Session-Id': '80bbfc' },
body: JSON.stringify({
sessionId: '80bbfc',
location: 'appwriteAdmin.js:adminFetch',
message: 'API key unauthorized',
data: { path, status: response.status, type: data?.type, code: data?.code },
hypothesisId: 'H9',
timestamp: Date.now(),
}),
}).catch(() => {})
// #endregion
}
throw error
}