{"record":{"id":"b9e59f90e27a7c17","repo":"Mintplex-Labs/anything-llm","slug":"res-error-failed-to-delete-flow","errorCode":null,"errorMessage":"res.error || \"Failed to delete flow\"","messagePattern":"res\\.error \\|\\| \"Failed to delete flow\"","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"frontend/src/models/agentFlows.js","lineNumber":110,"sourceCode":"  //     .catch((e) => ({\n  //       success: false,\n  //       error: e.message,\n  //       results: null,\n  //     }));\n  // },\n\n  /**\n   * Delete a specific flow\n   * @param {string} uuid - The UUID of the flow to delete\n   * @returns {Promise<{success: boolean, error: string | null}>}\n   */\n  deleteFlow: async (uuid) => {\n    return await fetch(`${API_BASE}/agent-flows/${uuid}`, {\n      method: \"DELETE\",\n      headers: baseHeaders(),\n    })\n      .then((res) => {\n        if (!res.ok) throw new Error(res.error || \"Failed to delete flow\");\n        return res;\n      })\n      .then((res) => res.json())\n      .catch((e) => ({\n        success: false,\n        error: e.message,\n      }));\n  },\n\n  /**\n   * Toggle a flow's active status\n   * @param {string} uuid - The UUID of the flow to toggle\n   * @param {boolean} active - The new active status\n   * @returns {Promise<{success: boolean, error: string | null}>}\n   */\n  toggleFlow: async (uuid, active) => {\n    try {\n      const result = await fetch(`${API_BASE}/agent-flows/${uuid}/toggle`, {","sourceCodeStart":92,"sourceCodeEnd":128,"githubUrl":"https://github.com/Mintplex-Labs/anything-llm/blob/3aec848f2885144aa8f1e53b9731a04310d5d558/frontend/src/models/agentFlows.js#L92-L128","documentation":"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'.","triggerScenarios":"Thrown when deleting an agent flow fails.","commonSituations":"Flow already deleted or insufficient permissions.","solutions":["Confirm the flow id is valid and still exists.","Check user permissions to delete flows.","Review server error message for the cause."],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"3aec848f2885144aa8f1e53b9731a04310d5d558","analyzedAt":"2026-08-18T10:02:21.017Z","contentChangedAt":"2026-08-18T10:02:21.017Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}