{"record":{"id":"c6a6f7ff854dd351","repo":"overleaf/overleaf","slug":"error-trying-to-get-websale-group-product-prices","errorCode":null,"errorMessage":"error trying to get websale group product prices","messagePattern":"error trying to get websale group product prices","errorType":"http","errorClass":null,"httpStatus":500,"severity":"error","filePath":"services/web/app/src/Features/Subscription/SubscriptionGroupController.mjs","lineNumber":490,"sourceCode":"    })\n  } catch (error) {\n    logger.err({ error }, 'error trying to render subtotal limit exceeded page')\n    return res.redirect('/user/subscription')\n  }\n}\n\nasync function getGroupPlanPerUserPrices(req, res) {\n  try {\n    const userId = SessionManager.getLoggedInUserId(req.session)\n    const prices = await Modules.promises.hooks.fire(\n      'getGroupPlanPerUserPrices',\n      userId,\n      req.query.currency\n    )\n    return res.json(prices[0])\n  } catch (error) {\n    logger.err({ error }, 'error trying to get websale group product prices')\n    return res.sendStatus(500)\n  }\n}\n\nexport default {\n  removeUserFromGroup: expressify(removeUserFromGroup),\n  removeSelfFromGroup: expressify(removeSelfFromGroup),\n  addSeatsToGroupSubscription: expressify(addSeatsToGroupSubscription),\n  submitForm: expressify(submitForm),\n  previewAddSeatsSubscriptionChange: expressify(\n    previewAddSeatsSubscriptionChange\n  ),\n  createAddSeatsSubscriptionChange: expressify(\n    createAddSeatsSubscriptionChange\n  ),\n  subscriptionUpgradePage: expressify(subscriptionUpgradePage),\n  upgradeSubscription: expressify(upgradeSubscription),\n  missingBillingInformation: expressify(missingBillingInformation),\n  manuallyCollectedSubscription: expressify(manuallyCollectedSubscription),","sourceCodeStart":472,"sourceCodeEnd":508,"githubUrl":"https://github.com/overleaf/overleaf/blob/28ad3b03b71cb4311decdcb55c36b33ec10d72db/services/web/app/src/Features/Subscription/SubscriptionGroupController.mjs#L472-L508","documentation":"Sent by getGroupPlanPerUserPrices when the 'getGroupPlanPerUserPrices' module hook (or session lookup) throws while computing per-user group plan prices for the websale flow. The error is logged and the endpoint returns a bare 500, indicating a server-side failure in price aggregation, not a client input problem.","triggerScenarios":"Thrown at services/web/app/src/Features/Subscription/SubscriptionGroupController.mjs:490 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Check web logs for the logged error from the hook payload","Verify the subscriptions/institutional modules backing the hook are loaded and healthy","Confirm the pricing data source (e.g. plans collection or v1 API) is reachable","Retry the request; if persistent, inspect the hook implementation for bugs"],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"28ad3b03b71cb4311decdcb55c36b33ec10d72db","analyzedAt":"2026-09-03T02:10:22.807Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-10T07:17:11.731Z"}