{"record":{"id":"169be594fb7ac885","repo":"jackwener/OpenCLI","slug":"steam-app-id-appid-returned-no-data-may-be-reg","errorCode":null,"errorMessage":"Steam app id ${appId} returned no data (may be region-locked or removed).","messagePattern":"Steam app id (.+?) returned no data \\(may be region-locked or removed\\)\\.","errorType":"exception","errorClass":"EmptyResultError","httpStatus":null,"severity":"error","filePath":"clis/steam/app.js","lineNumber":43,"sourceCode":"    strategy: Strategy.PUBLIC,\n    browser: false,\n    args: [\n        { name: 'id', positional: true, required: true, help: 'Numeric Steam app id (e.g. \"620\" for Portal 2)' },\n        { name: 'currency', default: 'us', help: 'Storefront country code (e.g. us / cn / jp / de)' },\n    ],\n    columns: [\n        'id', 'name', 'type', 'isFree', 'releaseDate', 'developers', 'publishers',\n        'price', 'currency', 'metacritic', 'recommendations', 'genres', 'categories',\n        'shortDescription', 'website', 'url',\n    ],\n    func: async (args) => {\n        const appId = requireAppId(args.id);\n        const cc = requireCountryCode(args.currency);\n        const url = `${STEAM_STORE}/api/appdetails?appids=${appId}&l=en&cc=${encodeURIComponent(cc)}`;\n        const body = await steamFetch(url, `steam app ${appId}`);\n        const wrapper = body?.[appId];\n        if (!wrapper || wrapper.success !== true || !wrapper.data) {\n            throw new EmptyResultError('steam app', `Steam app id ${appId} returned no data (may be region-locked or removed).`);\n        }\n        const data = wrapper.data;\n        const isFree = data.is_free === true;\n        const priceFinal = priceCents(data?.price_overview?.final ?? null);\n        return [{\n            id: String(data.steam_appid ?? appId),\n            name: decodeHtmlEntities(data.name ?? ''),\n            type: String(data.type ?? ''),\n            isFree,\n            releaseDate: String(data?.release_date?.date ?? ''),\n            developers: Array.isArray(data.developers) ? data.developers.join(', ') : '',\n            publishers: Array.isArray(data.publishers) ? data.publishers.join(', ') : '',\n            price: isFree ? 0 : priceFinal,\n            currency: String(data?.price_overview?.currency ?? '').toUpperCase(),\n            metacritic: data?.metacritic?.score != null ? Number(data.metacritic.score) : null,\n            recommendations: data?.recommendations?.total != null ? Number(data.recommendations.total) : null,\n            genres: joinNames(data.genres),\n            categories: joinNames(data.categories),","sourceCodeStart":25,"sourceCodeEnd":61,"githubUrl":"https://github.com/jackwener/OpenCLI/blob/49907e53dc3ade5c223ff0c4c2c2785687cec4e6/clis/steam/app.js#L25-L61","documentation":"The Steam appdetails endpoint responded, but the wrapper for the app id either is missing, has success:false, or has no data field. The CLI converts this into EmptyResultError, noting that region-locking or removal are common causes.","triggerScenarios":"Nonexistent app id; app not available in the requested country (cc); app removed/delisted from the store; Steam returning success:false for age-gated content without proper cookies.","commonSituations":"Using an id copied from a community page for a region-restricted game; querying cc=de for apps delisted in Germany; typos in the app id; very old apps that were pulled from the store.","solutions":["Verify the app id via `steam search` or the store URL store.steampowered.com/app/<id>/","Retry with a different currency/country code (e.g. us) in case of region-locking","Check the app page in a browser to confirm it still exists and is purchasable","Handle the EmptyResultError and fall back to cached/other data sources"],"exampleFix":"// before\nconst body = await steamFetch(url, `steam app ${appId}`);\nconst wrapper = body?.[appId];\nif (!wrapper || wrapper.success !== true || !wrapper.data) {\n  throw new EmptyResultError(...);\n}\n// after\nconst wrapper = body?.[appId];\nif (!wrapper?.data) {\n  // try fallback region before failing\n  const fallback = await steamFetch(url.replace(/cc=[a-z]{2}/, 'cc=us'), `steam app ${appId}`);\n  ...\n}","handlingStrategy":"validation","validationCode":"if (!/^\\d+$/.test(appId)) throw new Error(`invalid app id: ${appId}`);\n// optionally probe availability first:\nconst probe = await steamFetch(`${STEAM_STORE}/api/appdetails?appids=${appId}&l=en&cc=us`, 'probe');\nif (!probe?.[appId]?.data) throw new Error(`app ${appId} unavailable in us too`);","typeGuard":"function hasAppData(body, appId) {\n  const w = body?.[appId];\n  return typeof w === 'object' && w !== null && w.success === true && w.data != null;\n}","tryCatchPattern":"try {\n  const app = await steamApp({ id: appId, currency: cc });\n} catch (e) {\n  if (e instanceof EmptyResultError) {\n    // retry with cc=us or report app unavailable/region-locked\n  } else throw e;\n}","preventionTips":["Resolve app ids via `steam search` instead of manual entry","Try cc=us as a fallback when a region returns no data","Check the store page in a browser to confirm the app exists","Cache known-good app ids to avoid re-probing"],"tags":["steam","api","empty-result","region-lock"],"backgroundTag":"empty-api-payload","analyzedSha":"49907e53dc3ade5c223ff0c4c2c2785687cec4e6","analyzedAt":"2026-08-29T08:14:47.543Z","schemaVersion":2},"datasetVersion":"2026-08-29T17:17:51.833Z"}