{"record":{"id":"0d8e787beb4e45ab","repo":"medusajs/medusa","slug":"price-list-with-id-id-was-not-found-0d8e78","errorCode":null,"errorMessage":"Price list with id: ${id} was not found","messagePattern":"Price list with id: (.+?) was not found","errorType":"http","errorClass":"MedusaError","httpStatus":404,"severity":"error","filePath":"packages/medusa/src/api/admin/price-lists/queries/get-price-list.ts","lineNumber":33,"sourceCode":"  apiFields,\n}: {\n  id: string\n  container: MedusaContainer\n  remoteQueryFields: string[]\n  apiFields: string[]\n}): Promise<AdminPriceListRemoteQueryDTO> {\n  const remoteQuery = container.resolve(ContainerRegistrationKeys.REMOTE_QUERY)\n  const queryObject = remoteQueryObjectFromString({\n    entryPoint: \"price_list\",\n    fields: remoteQueryFields,\n    variables: { id },\n  })\n\n  const priceLists = await remoteQuery(queryObject)\n  const [sanitizedPriceList] = buildPriceListResponse(priceLists, apiFields)\n\n  if (!isPresent(sanitizedPriceList)) {\n    throw new MedusaError(\n      MedusaError.Types.NOT_FOUND,\n      `Price list with id: ${id} was not found`\n    )\n  }\n\n  return sanitizedPriceList\n}\n","sourceCodeStart":15,"sourceCodeEnd":41,"githubUrl":"https://github.com/medusajs/medusa/blob/5e06e544a296b9033f20f71f11c559f81a0e5739/packages/medusa/src/api/admin/price-lists/queries/get-price-list.ts#L15-L41","documentation":"Thrown by getPriceList in the price-list queries module when the remoteQuery result, after sanitization via buildPriceListResponse, is not present. Functionally the same family as the fetchPriceList variant: the requested price list id resolved to nothing.","triggerScenarios":"Querying a price list id that does not exist, was soft-deleted, or whose record was filtered out by the query constraints.","commonSituations":"Stale id references after re-seeding a dev database, concurrent deletion by another admin, or passing an internal id from a webhook payload for a different store/environment.","solutions":["List price lists (GET /admin/price-lists) to confirm the id","Re-seed or recreate the price list if the database was reset","Cross-check environment ids in custom integrations before calling"],"exampleFix":"// before\nconst { price_list } = await sdk.admin.priceList.retrieve(plId)\n\n// after\nconst { price_lists } = await sdk.admin.priceList.list()\nconst pl = price_lists.find((p) => p.id === plId)\nif (!pl) throw new Error(`Price list ${plId} missing; recreate before use`)","handlingStrategy":"try-catch","validationCode":"const { price_lists } = await sdk.admin.priceList.list({ id: [plId] })\nif (price_lists.length === 0) throw new Error(`Price list ${plId} not found`)","typeGuard":"const isPriceList = (v: unknown): v is HttpTypes.AdminPriceList =>\n  !!v && typeof v === \"object\" && \"id\" in v","tryCatchPattern":"try {\n  return await getPriceList(id)\n} catch (e: any) {\n  if (e.statusCode === 404) return undefined\n  throw e\n}","preventionTips":["Verify ids after environment switches","Treat concurrent deletions as expected in multi-admin setups","Log which ids vanished for auditability"],"tags":["admin","price-lists","not-found","queries"],"backgroundTag":"resource-not-found","analyzedSha":"5e06e544a296b9033f20f71f11c559f81a0e5739","analyzedAt":"2026-08-27T07:24:39.599Z","schemaVersion":2},"datasetVersion":"2026-08-27T08:17:20.692Z"}