{"record":{"id":"a29eb37d41cdf77e","repo":"medusajs/medusa","slug":"not-found-a29eb3","errorCode":"NOT_FOUND","errorMessage":"Product type with id: ${req.params.id} was not found","messagePattern":"Product type with id: (.+?) was not found","errorType":"exception","errorClass":"MedusaError","httpStatus":404,"severity":"error","filePath":"packages/medusa/src/api/store/product-types/[id]/route.ts","lineNumber":33,"sourceCode":"  res: MedusaResponse<StoreProductTypeResponse>\n) => {\n  const query = req.scope.resolve(ContainerRegistrationKeys.QUERY)\n\n  const { data } = await query.graph(\n    {\n      entity: \"product_type\",\n      filters: {\n        id: req.params.id,\n      },\n      fields: req.queryConfig.fields,\n    },\n    {\n      locale: req.locale,\n    }\n  )\n\n  if (!data.length) {\n    throw new MedusaError(\n      MedusaError.Types.NOT_FOUND,\n      `Product type with id: ${req.params.id} was not found`\n    )\n  }\n\n  const productType = data[0]\n\n  res.json({ product_type: productType })\n}\n","sourceCodeStart":15,"sourceCodeEnd":43,"githubUrl":"https://github.com/medusajs/medusa/blob/5e06e544a296b9033f20f71f11c559f81a0e5739/packages/medusa/src/api/store/product-types/[id]/route.ts#L15-L43","documentation":"Thrown by GET /store/product-types/:id when the query for the product type id returns no rows. The type id is invalid or deleted. Returns 404 NOT_FOUND.","triggerScenarios":"Requesting /store/product-types/ptyp_... with a nonexistent or deleted type id.","commonSituations":"Product type removed in admin but still referenced by frontend filters or cached URLs; typo in id.","solutions":["List types via GET /store/product-types to confirm the id exists","Regenerate filter/navigation data after type changes in the catalog"],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":"try {\n  const { product_type } = await sdk.store.productType.retrieve(id)\n} catch (e: any) {\n  if (e.type === 'not_found') notFound()\n  throw e\n}","preventionTips":["Rebuild filter data after type changes","Validate ids before deep-linking"],"tags":["store-api","product-type","not-found"],"backgroundTag":"resource-not-found-by-id","analyzedSha":"5e06e544a296b9033f20f71f11c559f81a0e5739","analyzedAt":"2026-08-27T07:24:39.599Z","schemaVersion":2},"datasetVersion":"2026-08-27T08:17:20.692Z"}