Mintplex-Labs/anything-llm · error · Error

response.error || "Failed to create system prompt"

Error message

response.error || "Failed to create system prompt"

What it means

Frontend guard in CommunityHub.createSystemPrompt: the create endpoint returned a non-ok status, so the system prompt was not published to the community hub; the backend error is surfaced or the generic creation-failure message is used.

Solutions

  1. Check the system prompt payload for required fields.
  2. Verify the Community Hub connection key.
  3. Review the server error message.
Defensive patterns

Strategy: try-catch

When it happens

Trigger: Thrown when creating a system prompt via the Community Hub fails.

Common situations: Invalid payload or hub connection issue.


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

Appendix: source

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

   * Create a new system prompt in the community hub
   * @param {Object} data - The system prompt data
   * @param {string} data.name - The name of the prompt
   * @param {string} data.description - The description of the prompt
   * @param {string} data.prompt - The actual system prompt text
   * @param {string[]} data.tags - Array of tags
   * @param {string} data.visibility - Either 'public' or 'private'
   * @returns {Promise<{success: boolean, error: string | null}>}
   */
  createSystemPrompt: async (data) => {
    return await fetch(`${API_BASE}/community-hub/system-prompt/create`, {
      method: "POST",
      headers: baseHeaders(),
      body: JSON.stringify(data),
    })
      .then(async (res) => {
        const response = await res.json();
        if (!res.ok)
          throw new Error(response.error || "Failed to create system prompt");
        return { success: true, error: null, itemId: response.item?.id };
      })
      .catch((e) => ({
        success: false,
        error: e.message,
      }));
  },

  /**
   * Create a new agent flow in the community hub
   * @param {Object} data - The agent flow data
   * @returns {Promise<{success: boolean, error: string | null}>}
   */
  createAgentFlow: async (data) => {
    return await fetch(`${API_BASE}/community-hub/agent-flow/create`, {
      method: "POST",
      headers: baseHeaders(),
      body: JSON.stringify(data),

View on GitHub (pinned to 3aec848f28)