{"record":{"id":"7695063f858c92f4","repo":"RocketChat/Rocket.Chat","slug":"marketplace-unsupported-version-769506","errorCode":null,"errorMessage":"Marketplace_Unsupported_Version","messagePattern":"Marketplace_Unsupported_Version","errorType":"error_code","errorClass":"MarketplaceUnsupportedVersionError","httpStatus":null,"severity":"error","filePath":"apps/meteor/ee/server/apps/marketplace/fetchMarketplaceCategories.ts","lineNumber":66,"sourceCode":"\t\tif (error instanceof CloudOfflineLicenseError) {\n\t\t\tthrow error;\n\t\t}\n\t\tthrow new MarketplaceConnectionError('Marketplace_Bad_Marketplace_Connection');\n\t}\n\n\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":48,"sourceCodeEnd":77,"githubUrl":"https://github.com/RocketChat/Rocket.Chat/blob/f9d3ec372bb580fa8d036f94cf03925a478ef768/apps/meteor/ee/server/apps/marketplace/fetchMarketplaceCategories.ts#L48-L77","documentation":"Thrown by fetchMarketplaceCategories when the marketplace responds with HTTP 426 and errorMsg === 'unsupported version'. Maps to MarketplaceUnsupportedVersionError (message 'Marketplace_Unsupported_Version'). Identical semantics to the apps variant: the client version is not supported by the marketplace. Note the categories variant has a smaller INTERNAL_MARKETPLACE_ERROR_CODES list [189, 266] and no 400-code-200 branch.","triggerScenarios":"Calling fetchMarketplaceCategories() on a Rocket.Chat version the marketplace no longer supports, returning 426 with errorMsg 'unsupported version'.","commonSituations":"Outdated Rocket.Chat release against the live marketplace; nightly/dev build ahead of marketplace support; marketplace raised its minimum version; downgrade scenario.","solutions":["Update Rocket.Chat to a marketplace-supported release.","Switch from nightly/dev to stable if applicable.","Consult release notes for the current minimum supported version.","If upgrade is impossible, treat marketplace categories as unavailable."],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":"function currentVersionSupportedForCategories(minSupported: string): boolean {\n  return compareVersions(Meteor.release, '>=', minSupported);\n}","typeGuard":"import { MarketplaceUnsupportedVersionError } from './marketplaceErrors';\n\nconst isUnsupportedVersionError = (e: unknown): e is MarketplaceUnsupportedVersionError =>\n  e instanceof MarketplaceUnsupportedVersionError;","tryCatchPattern":"try {\n  return await fetchMarketplaceCategories();\n} catch (e) {\n  if (e instanceof MarketplaceUnsupportedVersionError) {\n    notifyAdminUpgradeRequired();\n    return [];\n  }\n  throw e;\n}","preventionTips":["Keep Rocket.Chat on a marketplace-supported release.","Handle MarketplaceUnsupportedVersionError by prompting an upgrade, not a generic error.","Cache category data so a stale view is available when the marketplace rejects the version.","Treat categories as non-critical; degrade gracefully."],"tags":["marketplace","version","upgrade","categories","compatibility"],"backgroundTag":null,"analyzedSha":"f9d3ec372bb580fa8d036f94cf03925a478ef768","analyzedAt":"2026-08-12T19:07:17.372Z","schemaVersion":2},"datasetVersion":"2026-08-12T23:17:12.415Z"}