milvus-io/milvus · warning
Failed to delete command
Error message
Failed to delete command
What it means
Thrown by the WebUI telemetry page when a DELETE to /_telemetry/commands/{commandId} returns a non-2xx status other than 401 (401 logs the user out instead). The server-side command store rejected the delete: the command id no longer exists (already consumed, expired past its TTL, or removed by another operator), or the telemetry server hit an internal error.
Source
Thrown at internal/http/webui/telemetry.html:1966
</div>
`;
}).join('');
}
async function deleteCommand(commandId) {
try {
const resp = await fetch(`${API_BASE}/_telemetry/commands/${commandId}`, {
method: 'DELETE',
headers: authToken ? { 'Authorization': authToken } : {}
});
if (resp.status === 401) {
logout();
return;
}
if (!resp.ok) {
throw new Error('Failed to delete command');
}
// Refresh from server
await loadServerCommands();
showToast('Command deleted', 'success');
} catch (error) {
showToast('Error: ' + error.message, 'error');
}
}
// Client Errors Modal
async function showClientErrors(clientId) {
event.stopPropagation();
document.getElementById('errorModalClientId').textContent = clientId;
document.getElementById('errorModalContent').innerHTML = '<div class="empty-state" style="padding: 20px;"><p>Loading errors...</p></div>';
document.getElementById('errorModal').style.display = 'flex';
try {View on GitHub (pinned to b43a76673a)
Solutions
- Reload the command list (the page refreshes via loadServerCommands) and retry the delete only if the id still appears - an expired command needs no deletion.
- Check the proxy logs for the corresponding DELETE /_telemetry/commands/<id> status: 404 means already gone (safe to ignore), 500 means inspect the stack trace.
- If it persists, verify the command id in the URL matches the one shown in the row (copy/paste or encoding issues with ids containing special characters).
Example fix
// before
if (!resp.ok) {
throw new Error('Failed to delete command');
}
// after - treat 404 as already-deleted
if (resp.status === 404) {
await loadServerCommands();
showToast('Command no longer exists (already expired or consumed)', 'info');
return;
}
if (!resp.ok) {
const err = await resp.json().catch(() => ({}));
throw new Error(err.error || `Failed to delete command (HTTP ${resp.status})`);
} Defensive patterns
Strategy: try-catch
Try / catch
try {
const resp = await fetch(url, { method: 'DELETE', headers });
if (resp.status === 401) { logout(); return; }
if (resp.status === 404) { await loadServerCommands(); showToast('Already gone', 'info'); return; }
if (!resp.ok) throw new Error(`Delete failed: HTTP ${resp.status}`);
} catch (e) { showToast(e.message, 'error'); } Prevention
- Treat 404 on command deletion as success - the goal state (command absent) is already achieved.
- Refresh the command list before deleting to avoid acting on expired/consumed ids.
- Avoid deleting from multiple tabs simultaneously.
When it happens
Trigger: Clicking 'Delete' on a telemetry command row whose TTL already expired or that a client heartbeat already consumed and purged; issuing delete twice from two browser tabs; server-side 500 while the command registry is being written.
Common situations: Stale WebUI view listing commands that the server has already reaped (TTL_seconds elapsed); racing with a client heartbeat; Milvus restart wiping the in-memory command store while the page stayed open.
Related errors
- Failed to push collection metrics command
- Failed to query status
- Server error
- Failed to request errors
- HTTP ${response.status}
AI-assisted analysis of milvus-io/milvus@b43a76673a (2026-08-15).
Data as JSON: /api/errors/c2761141942a266e.
Report an issue: GitHub.