RocketChat/Rocket.Chat · error · MarketplaceAppsError
Marketplace_Internal_Error
Error message
Marketplace_Internal_Error
What it means
Thrown by fetchMarketplaceApps when the marketplace responds with HTTP 500 AND response.code is one of the internal marketplace error codes [266, 256, 166, 221, 257, 320]. Maps to MarketplaceAppsError('Marketplace_Internal_Error'). These codes represent known internal failures on the marketplace side; the response is logged at error level before throwing.
Source
Thrown at apps/meteor/ee/server/apps/marketplace/fetchMarketplaceApps.ts:192
}
const response = await request.json();
Apps.getRocketChatLogger().error({ msg: 'Error fetching marketplace apps', 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();
}
if (request.status === 400 && response.code === 200) {
throw new MarketplaceAppsError('Marketplace_Invalid_Apps_Engine_Version');
}
const INTERNAL_MARKETPLACE_ERROR_CODES = [266, 256, 166, 221, 257, 320];
if (request.status === 500 && INTERNAL_MARKETPLACE_ERROR_CODES.includes(response.code)) {
throw new MarketplaceAppsError('Marketplace_Internal_Error');
}
throw new MarketplaceAppsError('Marketplace_Failed_To_Fetch_Apps');
}
View on GitHub (pinned to f9d3ec372b)
Solutions
- Retry after a short delay - marketplace internal errors are often transient.
- Check Rocket.Chat status / cloud status page for ongoing incidents.
- Inspect server logs for the exact response.code to understand which marketplace subsystem failed.
- If persistent, report the code to Rocket.Chat support.
Defensive patterns
Strategy: retry
Validate before calling
const KNOWN_INTERNAL_CODES = new Set([266, 256, 166, 221, 257, 320]);
function classifyMarketplaceResponse(status: number, code: number) {
if (status === 500 && KNOWN_INTERNAL_CODES.has(code)) return 'internal-error-retryable';
return 'unknown';
} Type guard
import { MarketplaceAppsError } from './marketplaceErrors';
const isInternalMarketplaceError = (e: unknown): e is MarketplaceAppsError =>
e instanceof MarketplaceAppsError && e.message === 'Marketplace_Internal_Error'; Try / catch
try {
return await fetchMarketplaceApps();
} catch (e) {
if (e instanceof MarketplaceAppsError && e.message === 'Marketplace_Internal_Error') {
return await retryWithBackoff(() => fetchMarketplaceApps(), { retries: 3 });
}
throw e;
} Prevention
- Retry marketplace internal errors with exponential backoff (they are often transient).
- Check the cloud status page during sustained failures.
- Log the response.code to identify the failing marketplace subsystem.
- Degrade the UI gracefully (empty listing) while the marketplace recovers.
When it happens
Trigger: Calling fetchMarketplaceApps() during a marketplace-side incident where the marketplace returns 500 with one of the tracked internal codes. The set of codes is hardcoded and may not cover all marketplace 500s (those fall through to error 197).
Common situations: Marketplace backend outage or partial failure; transient database error on the marketplace; deployment incident on the cloud side; the specific code indicates which marketplace subsystem failed.
Related errors
- Marketplace_Failed_To_Fetch_Apps
- Invalid response from API
- App not found
- Failed to build external url
- Failed to build App Request external url
AI-assisted analysis of RocketChat/Rocket.Chat@f9d3ec372b (2026-08-12).
Data as JSON: /api/errors/db50f53bb6395fb3.
Report an issue: GitHub.