fix
This commit is contained in:
@@ -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
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user