{"record":{"id":"595a30dca672bf16","repo":"medusajs/medusa","slug":"property-label-with-id-id-not-found","errorCode":null,"errorMessage":"Property label with id: ${id} not found","messagePattern":"Property label with id: (.+?) not found","errorType":"exception","errorClass":"MedusaError","httpStatus":404,"severity":"error","filePath":"packages/medusa/src/api/admin/property-labels/[id]/route.ts","lineNumber":36,"sourceCode":" * @featureFlag view_configurations\n */\nexport const GET = async (\n  req: AuthenticatedMedusaRequest,\n  res: MedusaResponse<HttpTypes.AdminPropertyLabelResponse>\n) => {\n  const query = req.scope.resolve(ContainerRegistrationKeys.QUERY)\n  const { id } = req.params\n\n  const {\n    data: [propertyLabel],\n  } = await query.graph({\n    entity: \"property_label\",\n    fields: req.queryConfig.fields,\n    filters: { id },\n  })\n\n  if (!propertyLabel) {\n    throw new MedusaError(\n      MedusaError.Types.NOT_FOUND,\n      `Property label with id: ${id} not found`\n    )\n  }\n\n  res.json({ property_label: propertyLabel })\n}\n\n/**\n * Update a property label.\n * @since 2.10.3\n * @featureFlag view_configurations\n */\nexport const POST = async (\n  req: AuthenticatedMedusaRequest<HttpTypes.AdminUpdatePropertyLabel>,\n  res: MedusaResponse<HttpTypes.AdminPropertyLabelResponse>\n) => {\n  const query = req.scope.resolve(ContainerRegistrationKeys.QUERY)","sourceCodeStart":18,"sourceCodeEnd":54,"githubUrl":"https://github.com/medusajs/medusa/blob/5e06e544a296b9033f20f71f11c559f81a0e5739/packages/medusa/src/api/admin/property-labels/[id]/route.ts#L18-L54","documentation":"Thrown by GET /admin/property-labels/:id when the remoteQuery for entity 'property_label' filtered by id returns nothing. The route fetches with req.queryConfig.fields and 404s on an empty result.","triggerScenarios":"Requesting a property label id that does not exist or was deleted.","commonSituations":"UIs referencing labels removed during taxonomy cleanup, stale ids after re-seeding, or wrong-environment ids in scripts.","solutions":["List property labels (GET /admin/property-labels) and use current ids","Recreate the label if it was deleted but still needed","Refresh client caches after label maintenance operations"],"exampleFix":"// before\nconst { property_label } = await sdk.client.fetch(`/admin/property-labels/${id}`)\n\n// after\nconst { property_labels } = await sdk.client.fetch(\"/admin/property-labels\")\nif (!property_labels.some((l) => l.id === id)) {\n  throw new Error(`Property label ${id} missing`)\n}","handlingStrategy":"validation","validationCode":"const { property_labels } = await sdk.client.fetch(\"/admin/property-labels\")\nif (!property_labels.some((l) => l.id === labelId)) throw new Error(`Label ${labelId} not found`)","typeGuard":"const isPropertyLabel = (v: unknown): v is { id: string } & Record<string, unknown> =>\n  !!v && typeof v === \"object\" && \"id\" in v","tryCatchPattern":"try {\n  return await getPropertyLabel(id)\n} catch (e: any) {\n  if (e.statusCode === 404) { refreshLabels(); return null }\n  throw e\n}","preventionTips":["Refresh label lists after taxonomy maintenance","Don't persist label ids in long-lived caches","Validate ids from external imports before use"],"tags":["admin","property-labels","not-found","rest-api"],"backgroundTag":"resource-not-found","analyzedSha":"5e06e544a296b9033f20f71f11c559f81a0e5739","analyzedAt":"2026-08-27T07:24:39.599Z","schemaVersion":2},"datasetVersion":"2026-08-27T08:17:20.692Z"}