Mintplex-Labs/anything-llm · error · Error

response?.error ?? res.statusText

Error message

response?.error ?? res.statusText

What it means

Frontend guard in CommunityHub.importBundleItem: the import endpoint returned a non-ok status, so the bundle item was not imported; the parsed JSON error is preferred and the HTTP statusText serves as fallback detail when the body has no error field.

Solutions

  1. Check the Community Hub connection key in settings.
  2. Verify network access to the Community Hub.
  3. Review the response error for details.
Defensive patterns

Strategy: try-catch

When it happens

Trigger: Thrown when a Community Hub API request fails.

Common situations: Missing/invalid connection key or hub unreachable.


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

Appendix: source

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

          error: e.message,
        };
      });
  },

  /**
   * Import a bundle item from the community hub.
   * @param {string} importId - The import ID of the item.
   * @returns {Promise<{error: string | null, item: object | null}>}
   */
  importBundleItem: async (importId) => {
    return await fetch(`${API_BASE}/community-hub/import`, {
      method: "POST",
      headers: baseHeaders(),
      body: JSON.stringify({ importId }),
    })
      .then(async (res) => {
        const response = await res.json();
        if (!res.ok) throw new Error(response?.error ?? res.statusText);
        return response;
      })
      .catch((e) => {
        return {
          error: e.message,
          item: null,
        };
      });
  },

  /**
   * Update the hub settings (API key, etc.)
   * @param {Object} data - The data to update.
   * @returns {Promise<{success: boolean, error: string | null}>}
   */
  updateSettings: async (data) => {
    return await fetch(`${API_BASE}/community-hub/settings`, {
      method: "POST",

View on GitHub (pinned to 3aec848f28)