RocketChat/Rocket.Chat · error · MarketplaceAppsError

Marketplace_Failed_To_Fetch_Categories

Error message

Marketplace_Failed_To_Fetch_Categories

What it means

MarketplaceAppsError 'Marketplace_Failed_To_Fetch_Categories' is the fallback throw in fetchMarketplaceCategories for any non-200 response that is neither the 426 unsupported-version case (174) nor the 500+internal-code case (175). It means the categories endpoint answered with an unexpected failure (auth, rate limit, gateway error, unparseable body).

Solutions

  1. Inspect the 'Error fetching marketplace categories' log entry for the concrete status and body.
  2. Auth failures: resync Connectivity Services workspace registration.
  3. Transient 5xx/429: back off and retry with jittered timing.
  4. Persistent odd statuses: report with logs; use app search without categories meanwhile.
Defensive patterns

Strategy: try-catch

Try / catch

try {
  const cats = await fetchMarketplaceCategories();
} catch (e) {
  if (e instanceof MarketplaceAppsError && e.message === 'Marketplace_Failed_To_Fetch_Categories') {
    // check the log for the concrete status: auth -> resync; 429/5xx -> backoff; else report
  }
}

Prevention

When it happens

Trigger: Categories fetch returning 401/403 (bad workspace token), 429, 502/503/504, or odd statuses whose body codes are not in [189, 266]; all funnel to this error after being logged.

Common situations: Cloud registration/token problems; gateway hiccups during deploys; rate-limited custom dashboards polling categories; proxies mangling responses.

Related errors


AI-assisted analysis of RocketChat/Rocket.Chat@b2c16d5842 (2026-08-18). Data as JSON: /api/errors/15e25b53d05b8804. Report an issue: GitHub.

Appendix: source

Thrown at apps/meteor/ee/server/apps/marketplace/fetchMarketplaceCategories.ts:75

		return response;
	}

	const response = await request.json();

	Apps.getRocketChatLogger().error({ msg: 'Error fetching marketplace categories', status: request.status, response });

	// TODO: Refactor cloud to return a proper error code on unsupported version
	if (request.status === 426 && 'errorMsg' in response && response.errorMsg === 'unsupported version') {
		throw new MarketplaceUnsupportedVersionError();
	}

	const INTERNAL_MARKETPLACE_ERROR_CODES = [189, 266];

	if (request.status === 500 && INTERNAL_MARKETPLACE_ERROR_CODES.includes(response.code)) {
		throw new MarketplaceAppsError('Marketplace_Internal_Error');
	}

	throw new MarketplaceAppsError('Marketplace_Failed_To_Fetch_Categories');
}

View on GitHub (pinned to b2c16d5842)