{"record":{"id":"26f9d98e5073ca8a","repo":"medusajs/medusa","slug":"unsupported-entity-entity-available-entities","errorCode":null,"errorMessage":"Unsupported entity: ${entity}. Available entities include: ${entityNames.join(\", \")}${availableEntities.length > 10 ? \"...\" : \"\"}","messagePattern":"Unsupported entity: (.+?)\\. Available entities include: (.+?)(.+?)","errorType":"exception","errorClass":"MedusaError","httpStatus":400,"severity":"error","filePath":"packages/medusa/src/api/admin/views/[entity]/columns/route.ts","lineNumber":34,"sourceCode":"  res: MedusaResponse<HttpTypes.AdminViewsEntityColumnsResponse>\n) => {\n  const entity = req.params.entity\n\n  const settingsService =\n    req.scope.resolve<SettingsTypes.ISettingsModuleService>(Modules.SETTINGS)\n\n  if (!settingsService.isEntityDiscoveryInitialized()) {\n    throw new MedusaError(\n      MedusaError.Types.UNEXPECTED_STATE,\n      \"Entity discovery has not been initialized. Please ensure the application has fully started.\"\n    )\n  }\n\n  if (!settingsService.hasEntity(entity)) {\n    const availableEntities = await settingsService.listDiscoverableEntities()\n    const entityNames = availableEntities.map((e) => e.pluralName).slice(0, 10)\n\n    throw new MedusaError(\n      MedusaError.Types.INVALID_DATA,\n      `Unsupported entity: ${entity}. Available entities include: ${entityNames.join(\n        \", \"\n      )}${availableEntities.length > 10 ? \"...\" : \"\"}`\n    )\n  }\n\n  const columns = await settingsService.generateEntityColumns(entity)\n\n  if (!columns) {\n    throw new MedusaError(\n      MedusaError.Types.UNEXPECTED_STATE,\n      `Failed to generate columns for entity: ${entity}`\n    )\n  }\n\n  return res.json({\n    columns,","sourceCodeStart":16,"sourceCodeEnd":52,"githubUrl":"https://github.com/medusajs/medusa/blob/5e06e544a296b9033f20f71f11c559f81a0e5739/packages/medusa/src/api/admin/views/[entity]/columns/route.ts#L16-L52","documentation":"Thrown by GET /admin/views/:entity/columns when the requested entity name is not among the discoverable entities registered in the settings module. Lists up to 10 available entity names in the message.","triggerScenarios":"GET /admin/views/foo/columns where 'foo' is not a discoverable entity plural name; using singular instead of plural (e.g. 'product' vs 'products').","commonSituations":"Guessing entity names in URL; custom module not registered as discoverable; naming mismatch after upgrading Medusa versions that rename entities.","solutions":["Use the plural name of the entity (e.g. products, orders)","Call listDiscoverableEntities or check the message's available list","Ensure custom modules expose discoverable metadata if expected"],"exampleFix":"// before\nGET /admin/views/product/columns\n// after\nGET /admin/views/products/columns","handlingStrategy":"validation","validationCode":"const ok = ['products','orders', ...].includes(entity)\nif (!ok) throw new Error(`unknown entity ${entity}`)","typeGuard":"const isKnownEntity = (e: string): e is ViewEntity => KNOWN_ENTITIES.includes(e)","tryCatchPattern":null,"preventionTips":["Always use plural entity names","Fetch the available entity list dynamically"],"tags":["settings","views","entity","invalid-data"],"backgroundTag":"unknown-entity-name","analyzedSha":"5e06e544a296b9033f20f71f11c559f81a0e5739","analyzedAt":"2026-08-27T07:24:39.599Z","schemaVersion":2},"datasetVersion":"2026-08-27T08:17:20.692Z"}