{"record":{"id":"37ec285602764bd5","repo":"milvus-io/milvus","slug":"http-response-status","errorCode":null,"errorMessage":"HTTP ${response.status}","messagePattern":"HTTP \\$\\{response\\.status\\}","errorType":"http","errorClass":null,"httpStatus":null,"severity":"error","filePath":"internal/http/webui/telemetry.html","lineNumber":2127,"sourceCode":"        let currentConfigClientId = '';\n\n        async function showClientConfig(clientId) {\n            currentConfigClientId = clientId;\n            document.getElementById('configModalClientId').textContent = clientId;\n            document.getElementById('configModalContent').innerHTML = `\n                <div class=\"empty-state\" style=\"padding: 20px;\">\n                    <p>Fetching configuration from client...</p>\n                </div>\n            `;\n            document.getElementById('configModal').style.display = 'flex';\n\n            try {\n                const response = await fetch(`${API_BASE}/_telemetry/clients/${encodeURIComponent(clientId)}/config`, {\n                    headers: { 'Authorization': authToken }\n                });\n\n                if (!response.ok) {\n                    throw new Error(`HTTP ${response.status}`);\n                }\n\n                const data = await response.json();\n\n                if (data.status === 'pending') {\n                    // Start polling for the command reply\n                    document.getElementById('configModalContent').innerHTML = `\n                        <div class=\"empty-state\" style=\"padding: 20px;\">\n                            <p>Command sent. Waiting for client response...</p>\n                            <p style=\"font-size: 12px; color: var(--gray-400); margin-top: 8px;\">Command ID: ${escapeHtml(data.command_id)}</p>\n                        </div>\n                    `;\n                    pollForConfigReply(data.command_id, clientId);\n                } else {\n                    renderConfigResponse(data);\n                }\n            } catch (error) {\n                document.getElementById('configModalContent').innerHTML = `","sourceCodeStart":2109,"sourceCodeEnd":2145,"githubUrl":"https://github.com/milvus-io/milvus/blob/b43a76673a9fe5f01f158979731dc8fd542df81f/internal/http/webui/telemetry.html#L2109-L2145","documentation":"Thrown while fetching a client's configuration: GET /_telemetry/clients/{clientId}/config is an async command-dispatch endpoint; any non-2xx response (this code path does not special-case 401) raises this error with the raw HTTP status. Common statuses are 401 (expired sessionStorage token handled nowhere here), 404 (unknown client), and 500 (server-side dispatch failure).","triggerScenarios":"Clicking 'Config' on a client after the session token expired (401); client disconnected and evicted (404); server error while enqueueing the get_config command.","commonSituations":"Leaving the WebUI open past token/session lifetime; stale client table; proxy restarting so in-memory clients are empty.","solutions":["Check the status number shown in the message: 401 -> log in again; 404 -> refresh the client list and pick a live client; 5xx -> inspect proxy logs.","Refresh clients and retry the config fetch against a client with a current heartbeat.","If 401 recurs quickly, verify the milvusAuth sessionStorage token is being sent correctly (devtools Network tab)."],"exampleFix":"// before\nif (!response.ok) {\n    throw new Error(`HTTP ${response.status}`);\n}\n\n// after\nif (response.status === 401) {\n    logout();\n    return;\n}\nif (!response.ok) {\n    const err = await response.json().catch(() => ({}));\n    throw new Error(err.error || `HTTP ${response.status}`);\n}","handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":"try {\n  const response = await fetch(url, { headers: { 'Authorization': authToken } });\n  if (response.status === 401) { logout(); return; }\n  if (response.status === 404) { throw new Error('Client not found - it may have disconnected. Refresh the list.'); }\n  if (!response.ok) throw new Error(`Config request failed: HTTP ${response.status}`);\n} catch (e) { renderModalError(e.message); }","preventionTips":["Add explicit 401/404 handling before the generic !ok branch.","Refresh the client list and pick clients with a fresh heartbeat.","Log the command_id returned on success so late failures can be correlated with server logs."],"tags":["javascript","http","telemetry","configuration","webui"],"backgroundTag":null,"analyzedSha":"b43a76673a9fe5f01f158979731dc8fd542df81f","analyzedAt":"2026-08-15T10:29:28.408Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}