{"record":{"id":"b8ea9fe287c76e2a","repo":"milvus-io/milvus","slug":"empty-payload-received","errorCode":null,"errorMessage":"Empty payload received","messagePattern":"Empty payload received","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"warning","filePath":"internal/http/webui/telemetry.html","lineNumber":2184,"sourceCode":"                        throw new Error(`HTTP ${response.status}`);\n                    }\n\n                    const data = await response.json();\n                    const clients = data.clients || [];\n\n                    if (clients.length > 0) {\n                        const client = clients[0];\n                        const replies = client.command_replies || [];\n                        const configReply = replies.find(r => r.command_id === commandId);\n\n                        if (configReply) {\n                            if (configReply.success && configReply.payload) {\n                                try {\n                                    // Payload is a JSON string (not base64) - parse directly\n                                    // Server stores Payload as string type, so no base64 decoding needed\n                                    const payloadStr = configReply.payload;\n                                    if (!payloadStr || payloadStr.trim() === '') {\n                                        throw new Error('Empty payload received');\n                                    }\n                                    const configData = JSON.parse(payloadStr);\n                                    renderConfigData(configData);\n                                } catch (e) {\n                                    console.error('Failed to parse config response:', e, 'payload:', configReply.payload);\n                                    document.getElementById('configModalContent').innerHTML = `\n                                        <div class=\"empty-state\" style=\"padding: 20px;\">\n                                            <p style=\"color: var(--danger);\">Failed to parse config response: ${escapeHtml(e.message)}</p>\n                                            <p style=\"font-size: 12px; color: var(--gray-400); margin-top: 8px;\">Raw payload: ${escapeHtml(String(configReply.payload).substring(0, 200))}</p>\n                                        </div>\n                                    `;\n                                }\n                            } else {\n                                document.getElementById('configModalContent').innerHTML = `\n                                    <div class=\"empty-state\" style=\"padding: 20px;\">\n                                        <p style=\"color: var(--danger);\">Config request failed: ${escapeHtml(configReply.error_msg || 'Unknown error')}</p>\n                                    </div>\n                                `;","sourceCodeStart":2166,"sourceCodeEnd":2202,"githubUrl":"https://github.com/milvus-io/milvus/blob/b43a76673a9fe5f01f158979731dc8fd542df81f/internal/http/webui/telemetry.html#L2166-L2202","documentation":"Raised in the config-reply parser when a command reply exists, is marked successful, but its payload is an empty or whitespace-only JSON string. The client acknowledged the get_config command yet attached no configuration body - typically the client-side handler produced an empty serialized config, or the stored string was truncated/cleared server-side before the UI read it.","triggerScenarios":"Client's get_config handler returns success with an empty payload string; reply payload field cleared after TTL; client version that acknowledges but does not implement payload serialization for the requested config section.","commonSituations":"Version skew between an older client binary and a newer WebUI expecting a populated payload; inspecting a reply after it has partially expired; client with an empty/failed config load that still reports success.","solutions":["Retry the config fetch once - transient empty payloads on the first heartbeat after client startup are common.","Check the server logs where client errors/replies are dumped: the client may have logged why the config body was empty.","Confirm client and server versions match; upgrade the client if it predates the get_config payload feature.","Inspect the raw payload shown in the modal ('Raw payload: ...' line) to confirm it is genuinely empty rather than unparseable."],"exampleFix":null,"handlingStrategy":"validation","validationCode":"// validate reply payload before parsing\nconst raw = typeof configReply.payload === 'string' ? configReply.payload.trim() : '';\nif (!raw) {\n  renderModalError('Client returned an empty config payload - retry or check client logs');\n    return;\n}\nlet configData;\ntry { configData = JSON.parse(raw); } catch { renderModalError('Config payload is not valid JSON'); return; }","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Trim and non-empty-check any payload string before JSON.parse.","Retry the config command once on empty payload before showing an error.","Verify client and server versions both support populated get_config replies."],"tags":["javascript","telemetry","configuration","data-validation","webui"],"backgroundTag":null,"analyzedSha":"b43a76673a9fe5f01f158979731dc8fd542df81f","analyzedAt":"2026-08-15T10:29:28.408Z","schemaVersion":2},"datasetVersion":"2026-08-15T17:31:12.345Z"}