{"record":{"id":"da5f0ad073d0074e","repo":"Mintplex-Labs/anything-llm","slug":"response-error-failed-to-create-system-prompt","errorCode":null,"errorMessage":"response.error || \"Failed to create system prompt\"","messagePattern":"response\\.error \\|\\| \"Failed to create system prompt\"","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"frontend/src/models/communityHub.js","lineNumber":176,"sourceCode":"   * Create a new system prompt in the community hub\n   * @param {Object} data - The system prompt data\n   * @param {string} data.name - The name of the prompt\n   * @param {string} data.description - The description of the prompt\n   * @param {string} data.prompt - The actual system prompt text\n   * @param {string[]} data.tags - Array of tags\n   * @param {string} data.visibility - Either 'public' or 'private'\n   * @returns {Promise<{success: boolean, error: string | null}>}\n   */\n  createSystemPrompt: async (data) => {\n    return await fetch(`${API_BASE}/community-hub/system-prompt/create`, {\n      method: \"POST\",\n      headers: baseHeaders(),\n      body: JSON.stringify(data),\n    })\n      .then(async (res) => {\n        const response = await res.json();\n        if (!res.ok)\n          throw new Error(response.error || \"Failed to create system prompt\");\n        return { success: true, error: null, itemId: response.item?.id };\n      })\n      .catch((e) => ({\n        success: false,\n        error: e.message,\n      }));\n  },\n\n  /**\n   * Create a new agent flow in the community hub\n   * @param {Object} data - The agent flow data\n   * @returns {Promise<{success: boolean, error: string | null}>}\n   */\n  createAgentFlow: async (data) => {\n    return await fetch(`${API_BASE}/community-hub/agent-flow/create`, {\n      method: \"POST\",\n      headers: baseHeaders(),\n      body: JSON.stringify(data),","sourceCodeStart":158,"sourceCodeEnd":194,"githubUrl":"https://github.com/Mintplex-Labs/anything-llm/blob/3aec848f2885144aa8f1e53b9731a04310d5d558/frontend/src/models/communityHub.js#L158-L194","documentation":"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.","triggerScenarios":"Thrown when creating a system prompt via the Community Hub fails.","commonSituations":"Invalid payload or hub connection issue.","solutions":["Check the system prompt payload for required fields.","Verify the Community Hub connection key.","Review the server error message."],"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-14T00:17:10.932Z"}