Mintplex-Labs/anything-llm · error · Error

res.error || "Failed to get flow"

Error message

res.error || "Failed to get flow"

What it means

Frontend guard in AgentFlows.getFlow: the GET for a single flow by UUID returned a non-ok status, so no flow payload could be read; the server error is preferred and the generic 'Failed to get flow' message is the fallback when the response body carries no detail.

Solutions

  1. Verify the flow id exists and the user has access.
  2. Check network connectivity to the server.
  3. Inspect the server logs for the underlying error.
Defensive patterns

Strategy: try-catch

When it happens

Trigger: Thrown when fetching an agent flow fails.

Common situations: Flow was deleted, wrong id, or server error.


AI-assisted analysis of Mintplex-Labs/anything-llm@3aec848f28 (2026-08-18). Data as JSON: /api/errors/74196513d8210045. Report an issue: GitHub.

Appendix: source

Thrown at frontend/src/models/agentFlows.js:61

      .catch((e) => ({
        success: false,
        error: e.message,
        flows: [],
      }));
  },

  /**
   * Get a specific flow by UUID
   * @param {string} uuid - The UUID of the flow to retrieve
   * @returns {Promise<{success: boolean, error: string | null, flow: {name: string, config: object, uuid: string} | null}>}
   */
  getFlow: async (uuid) => {
    return await fetch(`${API_BASE}/agent-flows/${uuid}`, {
      method: "GET",
      headers: baseHeaders(),
    })
      .then((res) => {
        if (!res.ok) throw new Error(res.error || "Failed to get flow");
        return res;
      })
      .then((res) => res.json())
      .catch((e) => ({
        success: false,
        error: e.message,
        flow: null,
      }));
  },

  /**
   * Execute a specific flow
   * @param {string} uuid - The UUID of the flow to run
   * @param {object} variables - Optional variables to pass to the flow
   * @returns {Promise<{success: boolean, error: string | null, results: object | null}>}
   */
  // runFlow: async (uuid, variables = {}) => {
  //   return await fetch(`${API_BASE}/agent-flows/${uuid}/run`, {

View on GitHub (pinned to 3aec848f28)