OtterMind/Chat2DB · warning · Error
Pricing is disabled in community mode
Error message
Pricing is disabled in community mode
What it means
The community-mode pricing stub throws when createOrder() is called. The Community edition has no billing/payment integration, so the stub returns empty data for read methods (getProductList, getOrderList) but throws for transactional methods (createOrder, getOrder) to prevent any accidental order flow. This is a deliberate product-contract boundary, not a bug.
Source
Thrown at chat2db-community-client/src/community-stubs/service/pricing.ts:4
const pricingServices = {
getProductList: async () => [],
createOrder: async () => {
throw new Error('Pricing is disabled in community mode');
},
getOrder: async () => {
throw new Error('Pricing is disabled in community mode');
},
getOrderList: async () => [],
cancelSubscription: async () => undefined,
};
export default pricingServices;
View on GitHub (pinned to 5ee1e990e7)
Solutions
- Hide or disable the order/checkout UI in Community builds using the runtime edition helper.
- Guard createOrder calls: if (__RUNTIME_ENV__ === 'community') return; before invoking it.
- Audit all createOrder call sites and ensure each is behind an Enterprise-only feature gate.
Example fix
// before
await pricingServices.createOrder({ id, seats });
// after
if (__RUNTIME_ENV__ !== 'community') {
await pricingServices.createOrder({ id, seats });
} Defensive patterns
Strategy: validation
Validate before calling
function isPricingEnabled(): boolean {
return __RUNTIME_ENV__ !== 'community';
}
if (isPricingEnabled()) {
await pricingServices.createOrder(params);
} Prevention
- Hide billing/upgrade UI in Community via conditional rendering on edition.
- Audit all createOrder call sites during Community build review.
- Add a lint rule or codemod to flag createOrder calls without edition guards.
When it happens
Trigger: Calling pricingServices.createOrder() in a Community build — e.g., a pricing/billing modal that was not fully hidden, or a redirect to a checkout flow that invokes createOrder before checking edition.
Common situations: A shared upgrade/billing button rendered in Community without edition gating. Refactoring pricing UI but forgetting to stub-test the order creation path. Environments mislabeled so Community code loads Enterprise pricing handlers.
Related errors
- Pricing is disabled in community mode
- Pricing is disabled in community mode
- License flow is disabled in community mode
- License flow is disabled in community mode
- The baseURL is not valid!
AI-assisted analysis of OtterMind/Chat2DB@5ee1e990e7 (2026-08-14).
Data as JSON: /api/errors/d0ca34d490aa9389.
Report an issue: GitHub.