{"record":{"id":"5af7afb7261945fa","repo":"medusajs/medusa","slug":"not-found-5af7af","errorCode":"NOT_FOUND","errorMessage":"Product option with id: ${req.params.id} was not found","messagePattern":"Product option with id: (.+?) was not found","errorType":"exception","errorClass":"MedusaError","httpStatus":404,"severity":"error","filePath":"packages/medusa/src/api/store/product-options/[id]/route.ts","lineNumber":29,"sourceCode":"/**\n * @since 2.16.0\n */\nexport const GET = async (\n  req: AuthenticatedMedusaRequest<{}, HttpTypes.SelectParams>,\n  res: MedusaResponse<HttpTypes.StoreProductOptionResponse>\n) => {\n  const query = req.scope.resolve(ContainerRegistrationKeys.QUERY)\n\n  const { data } = await query.graph({\n    entity: \"product_option\",\n    filters: {\n      id: req.params.id,\n    },\n    fields: req.queryConfig.fields,\n  })\n\n  if (!data.length) {\n    throw new MedusaError(\n      MedusaError.Types.NOT_FOUND,\n      `Product option with id: ${req.params.id} was not found`\n    )\n  }\n\n  res.json({ product_option: data[0] })\n}\n","sourceCodeStart":11,"sourceCodeEnd":37,"githubUrl":"https://github.com/medusajs/medusa/blob/5e06e544a296b9033f20f71f11c559f81a0e5739/packages/medusa/src/api/store/product-options/[id]/route.ts#L11-L37","documentation":"Thrown by GET /store/product-options/:id when the query for that product option id returns an empty array. The option id is invalid, deleted, or belongs to a product not visible in the store. Returns 404 NOT_FOUND.","triggerScenarios":"Requesting /store/product-options/opt_... with a nonexistent or deleted option id, or an option belonging to an unpublished product.","commonSituations":"Stale deep links after option/product removal; ids cached from a previous catalog import; typos in the id.","solutions":["List options via GET /store/product-options to confirm the id exists","Refresh any cached ids on the storefront after catalog changes","Link to the parent product page instead of a raw option when possible"],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":"try {\n  const { product_option } = await sdk.store.productOption.retrieve(id)\n} catch (e: any) {\n  if (e.type === 'not_found') notFound()\n  throw e\n}","preventionTips":["Fetch option ids from product payloads","Invalidate cached catalog ids after syncs"],"tags":["store-api","product-option","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"}