{"record":{"id":"bc789cd68711a086","repo":"Mintplex-Labs/anything-llm","slug":"response-error-res-statustext","errorCode":null,"errorMessage":"response?.error ?? res.statusText","messagePattern":"response\\?\\.error \\?\\? res\\.statusText","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"frontend/src/models/communityHub.js","lineNumber":61,"sourceCode":"          error: e.message,\n        };\n      });\n  },\n\n  /**\n   * Import a bundle item from the community hub.\n   * @param {string} importId - The import ID of the item.\n   * @returns {Promise<{error: string | null, item: object | null}>}\n   */\n  importBundleItem: async (importId) => {\n    return await fetch(`${API_BASE}/community-hub/import`, {\n      method: \"POST\",\n      headers: baseHeaders(),\n      body: JSON.stringify({ importId }),\n    })\n      .then(async (res) => {\n        const response = await res.json();\n        if (!res.ok) throw new Error(response?.error ?? res.statusText);\n        return response;\n      })\n      .catch((e) => {\n        return {\n          error: e.message,\n          item: null,\n        };\n      });\n  },\n\n  /**\n   * Update the hub settings (API key, etc.)\n   * @param {Object} data - The data to update.\n   * @returns {Promise<{success: boolean, error: string | null}>}\n   */\n  updateSettings: async (data) => {\n    return await fetch(`${API_BASE}/community-hub/settings`, {\n      method: \"POST\",","sourceCodeStart":43,"sourceCodeEnd":79,"githubUrl":"https://github.com/Mintplex-Labs/anything-llm/blob/3aec848f2885144aa8f1e53b9731a04310d5d558/frontend/src/models/communityHub.js#L43-L79","documentation":"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.","triggerScenarios":"Thrown when a Community Hub API request fails.","commonSituations":"Missing/invalid connection key or hub unreachable.","solutions":["Check the Community Hub connection key in settings.","Verify network access to the Community Hub.","Review the response error for details."],"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"}