Mintplex-Labs/anything-llm · error · Error
res.error || "Failed to delete flow"
Error message
res.error || "Failed to delete flow"
What it means
Frontend guard in AgentFlows.deleteFlow: the DELETE request for a flow UUID returned a non-ok status, so the deletion did not happen server-side; the backend error text is surfaced when available, otherwise 'Failed to delete flow'.
Solutions
- Confirm the flow id is valid and still exists.
- Check user permissions to delete flows.
- Review server error message for the cause.
Defensive patterns
Strategy: try-catch
When it happens
Trigger: Thrown when deleting an agent flow fails.
Common situations: Flow already deleted or insufficient permissions.
AI-assisted analysis of Mintplex-Labs/anything-llm@3aec848f28 (2026-08-18).
Data as JSON: /api/errors/b9e59f90e27a7c17.
Report an issue: GitHub.
Appendix: source
Thrown at frontend/src/models/agentFlows.js:110
// .catch((e) => ({
// success: false,
// error: e.message,
// results: null,
// }));
// },
/**
* Delete a specific flow
* @param {string} uuid - The UUID of the flow to delete
* @returns {Promise<{success: boolean, error: string | null}>}
*/
deleteFlow: async (uuid) => {
return await fetch(`${API_BASE}/agent-flows/${uuid}`, {
method: "DELETE",
headers: baseHeaders(),
})
.then((res) => {
if (!res.ok) throw new Error(res.error || "Failed to delete flow");
return res;
})
.then((res) => res.json())
.catch((e) => ({
success: false,
error: e.message,
}));
},
/**
* Toggle a flow's active status
* @param {string} uuid - The UUID of the flow to toggle
* @param {boolean} active - The new active status
* @returns {Promise<{success: boolean, error: string | null}>}
*/
toggleFlow: async (uuid, active) => {
try {
const result = await fetch(`${API_BASE}/agent-flows/${uuid}/toggle`, {View on GitHub (pinned to 3aec848f28)