{"record":{"id":"19c848cfd8617e7a","repo":"iflytek/astron-agent","slug":"e-status","errorCode":"e.status","errorMessage":"e.statusText","messagePattern":"e\\.statusText","errorType":"http","errorClass":"X","httpStatus":null,"severity":"warning","filePath":"console/frontend/src/utils/avatar-sdk-web_3.1.2.1002/xrtc-player-BJTnVhG9.js","lineNumber":13168,"sourceCode":"                  t.extendInfo &&\n                    t.extendInfo.location &&\n                    (o += r\n                      ? '&location='.concat(t.extendInfo.location)\n                      : '?location='.concat(t.extendInfo.location)),\n                  t.privateKey &&\n                    (o += r\n                      ? '&privateKey='.concat(t.privateKey)\n                      : '?privateKey='.concat(t.privateKey)),\n                  i.abrupt(\n                    'return',\n                    fetch(o, {\n                      method: 'POST',\n                      body: JSON.stringify(e),\n                      headers: n,\n                    })\n                      .then(function (e) {\n                        if (e.ok) return e.json();\n                        throw new X({ code: e.status, message: e.statusText });\n                      })\n                      .catch(function (e) {\n                        return Promise.reject(e);\n                      })\n                  )\n                );\n              case 10:\n              case 'end':\n                return i.stop();\n            }\n        }, i);\n      })\n    )();\n  },\n};\nfunction Ii(e, t) {\n  var i = Object.keys(e);\n  if (Object.getOwnPropertySymbols) {","sourceCodeStart":13150,"sourceCodeEnd":13186,"githubUrl":"https://github.com/iflytek/astron-agent/blob/5e758547a83371a5a4b29dadf4ac03e8dd527635/console/frontend/src/utils/avatar-sdk-web_3.1.2.1002/xrtc-player-BJTnVhG9.js#L13150-L13186","documentation":"The SDK's `upload` function POSTs log batches to `{baseUrl}/api/v1/logging/collect/list`. If the response is not ok, it throws `new X({ code: e.status, message: e.statusText })` — so the error's `code` is the raw HTTP status number (the message field shows as `e.statusText`, e.g. 'Internal Server Error'). This is the SDK's log-upload path failing with an uninterpreted HTTP error.","triggerScenarios":"Any avatar session that triggers log collection where the logging endpoint returns a non-2xx status: wrong baseUrl for the logging route, service down (5xx), auth rejection (401/403), payload rejected (413/400), or 404 because the collect route does not exist in that environment.","commonSituations":"Log-upload endpoint not deployed/routed in the environment; oversized log batch bodies rejected; expired credentials making the POST 401; backend logging service returning 500 under load.","solutions":["Inspect the network request to /api/v1/logging/collect/list for the actual status code (the thrown code === HTTP status) and treat it like that HTTP error.","Verify the logging-collect service is deployed and the SDK baseUrl resolves to it in this environment.","Reduce log batch size / upload frequency if rejected with 413 or 429.","Refresh credentials if the POST is rejected 401/403.","Since this is telemetry upload, wrap upload calls so failures are logged and swallowed rather than breaking the avatar session."],"exampleFix":"// before: unguarded SDK log upload\nsdk.upload(logs)\n// after\ncatchAndLog(() => sdk.upload(logs)); // telemetry failure must not break the session","handlingStrategy":"try-catch","validationCode":"if (!navigator.onLine) skipLogUpload();\nif (logs.reduce((n, l) => n + l.length, 0) > 1_000_000) logs = truncateBatch(logs);","typeGuard":"function isUploadHttpError(e) { return typeof e?.code === 'number' && e.code >= 400 && e.code < 600; }","tryCatchPattern":"try { await sdk.upload(logs) }\ncatch (e) {\n  if (isUploadHttpError(e)) console.warn(`Log upload failed (HTTP ${e.code}), will retry later`, e.message);\n  // never rethrow: telemetry must not break the avatar session\n}","preventionTips":["Treat log upload as best-effort: always catch and queue for later retry","Cap batch payload size to avoid 413 rejections","Verify the logging-collect route exists in every environment during deploy smoke tests"],"tags":["network","avatar-sdk","logging","http-error"],"backgroundTag":"http-error-response","analyzedSha":"5e758547a83371a5a4b29dadf4ac03e8dd527635","analyzedAt":"2026-09-12T08:03:51.356Z","contentChangedAt":"2026-09-12T08:03:51.356Z","schemaVersion":2},"datasetVersion":"2026-09-15T23:17:13.987Z"}