{"record":{"id":"e46173ac2eda3c07","repo":"medusajs/medusa","slug":"not-found-e46173","errorCode":"NOT_FOUND","errorMessage":"Product tag with id: ${req.params.id} was not found","messagePattern":"Product tag with id: (.+?) was not found","errorType":"exception","errorClass":"MedusaError","httpStatus":404,"severity":"error","filePath":"packages/medusa/src/api/store/product-tags/[id]/route.ts","lineNumber":33,"sourceCode":"  res: MedusaResponse<StoreProductTagResponse>\n) => {\n  const query = req.scope.resolve(ContainerRegistrationKeys.QUERY)\n\n  const { data } = await query.graph(\n    {\n      entity: \"product_tag\",\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 tag with id: ${req.params.id} was not found`\n    )\n  }\n\n  const productTag = data[0]\n\n  res.json({ product_tag: productTag })\n}\n","sourceCodeStart":15,"sourceCodeEnd":43,"githubUrl":"https://github.com/medusajs/medusa/blob/5e06e544a296b9033f20f71f11c559f81a0e5739/packages/medusa/src/api/store/product-tags/[id]/route.ts#L15-L43","documentation":"Thrown by GET /store/product-tags/:id when the query for the tag id returns no rows. The tag id is invalid or deleted. Returns 404 NOT_FOUND.","triggerScenarios":"Requesting /store/product-tags/ptag_... with a nonexistent or deleted tag id.","commonSituations":"Tag deleted via admin while storefront pages still link to it; ids from a stale sitemap or cached navigation.","solutions":["List tags via GET /store/product-tags to confirm the id exists","Update or remove storefront links referencing deleted tags"],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":"try {\n  const { product_tag } = await sdk.store.productTag.retrieve(id)\n} catch (e: any) {\n  if (e.type === 'not_found') notFound()\n  throw e\n}","preventionTips":["Resolve tag ids from list endpoints","Remove nav links to deleted tags via admin sync"],"tags":["store-api","product-tag","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"}