{"record":{"id":"17e1eca987274c6c","repo":"RocketChat/Rocket.Chat","slug":"marketplace-internal-error-17e1ec","errorCode":null,"errorMessage":"Marketplace_Internal_Error","messagePattern":"Marketplace_Internal_Error","errorType":"exception","errorClass":"MarketplaceAppsError","httpStatus":400,"severity":"error","filePath":"apps/meteor/ee/server/apps/marketplace/fetchMarketplaceCategories.ts","lineNumber":72,"sourceCode":"\tif (request.status === 200) {\n\t\tconst response = await request.json();\n\t\tfetchMarketplaceCategoriesSchema.parse(response);\n\t\treturn response;\n\t}\n\n\tconst response = await request.json();\n\n\tApps.getRocketChatLogger().error({ msg: 'Error fetching marketplace categories', status: request.status, response });\n\n\t// TODO: Refactor cloud to return a proper error code on unsupported version\n\tif (request.status === 426 && 'errorMsg' in response && response.errorMsg === 'unsupported version') {\n\t\tthrow new MarketplaceUnsupportedVersionError();\n\t}\n\n\tconst INTERNAL_MARKETPLACE_ERROR_CODES = [189, 266];\n\n\tif (request.status === 500 && INTERNAL_MARKETPLACE_ERROR_CODES.includes(response.code)) {\n\t\tthrow new MarketplaceAppsError('Marketplace_Internal_Error');\n\t}\n\n\tthrow new MarketplaceAppsError('Marketplace_Failed_To_Fetch_Categories');\n}\n","sourceCodeStart":54,"sourceCodeEnd":77,"githubUrl":"https://github.com/RocketChat/Rocket.Chat/blob/b2c16d5842cbe6b69b59bdf6fc5e5f1afcd1f0b0/apps/meteor/ee/server/apps/marketplace/fetchMarketplaceCategories.ts#L54-L77","documentation":"MarketplaceAppsError 'Marketplace_Internal_Error' from fetchMarketplaceCategories: the categories request returned HTTP 500 with cloud body code in [189, 266] — the categories-specific set of known cloud internal failure codes. Same mapping pattern as 172, different endpoint and code list; response logged as 'Error fetching marketplace categories'.","triggerScenarios":"Browsing marketplace categories while the cloud's categories service fails internally; not triggerable by client input. The apps listing may be fine while only categories error.","commonSituations":"Cloud incidents touching the categories service; deploy windows on cloud; caching layers serving error envelopes with 500.","solutions":["Retry shortly; internal cloud errors on categories are usually transient.","Check cloud status pages for incidents.","Persist the logged status/response and contact support if it lasts beyond the incident window.","Fallback: browse/search apps without category filters, which uses the apps-list call path."],"exampleFix":null,"handlingStrategy":"retry","validationCode":null,"typeGuard":null,"tryCatchPattern":"try {\n  const cats = await fetchMarketplaceCategories();\n} catch (e) {\n  if (e instanceof MarketplaceAppsError && e.message === 'Marketplace_Internal_Error') {\n    await sleep(2000);\n    return fetchMarketplaceCategories(); // single retry; then degrade gracefully\n  }\n  throw e;\n}","preventionTips":["Treat categories as progressive enhancement: render the marketplace without them on failure.","Cache categories; they change rarely.","Retry once with backoff before degrading."],"tags":["marketplace","categories","cloud","internal-error","upstream","enterprise"],"backgroundTag":"upstream-server-error","analyzedSha":"b2c16d5842cbe6b69b59bdf6fc5e5f1afcd1f0b0","analyzedAt":"2026-08-18T15:26:39.429Z","contentChangedAt":"2026-08-18T15:26:39.429Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}