{"record":{"id":"6731ec47cadffb08","repo":"bitwarden/server","slug":"provider-seat-minimums-must-be-at-least-0","errorCode":null,"errorMessage":"Provider seat minimums must be at least 0.","messagePattern":"Provider seat minimums must be at least 0\\.","errorType":"exception","errorClass":"BadRequestException","httpStatus":400,"severity":"error","filePath":"bitwarden_license/src/Commercial.Core/Billing/Providers/Services/ProviderBillingService.cs","lineNumber":734,"sourceCode":"                subscription.Status);\n\n            throw new BillingException();\n        }\n        catch (StripeException stripeException) when (stripeException.StripeError?.Code ==\n                                                      ErrorCodes.CustomerTaxLocationInvalid)\n        {\n            throw new BadRequestException(\n                \"Your location wasn't recognized. Please ensure your country and postal code are valid.\");\n        }\n    }\n\n    public async Task UpdateSeatMinimums(UpdateProviderSeatMinimumsCommand command)\n    {\n        var (provider, updatedPlanConfigurations) = command;\n\n        if (updatedPlanConfigurations.Any(x => x.SeatsMinimum < 0))\n        {\n            throw new BadRequestException(\"Provider seat minimums must be at least 0.\");\n        }\n\n        var subscription = await subscriberService.GetSubscriptionOrThrow(provider);\n\n        var subscriptionItemOptionsList = new List<SubscriptionItemOptions>();\n\n        var providerPlans = await providerPlanRepository.GetByProviderId(provider.Id);\n\n        foreach (var updatedPlanConfiguration in updatedPlanConfigurations)\n        {\n            var (updatedPlanType, updatedSeatMinimum) = updatedPlanConfiguration;\n\n            var providerPlan =\n                providerPlans.Single(providerPlan => providerPlan.PlanType == updatedPlanType);\n\n            if (providerPlan.SeatMinimum != updatedSeatMinimum)\n            {\n                var priceId = ProviderPriceAdapter.GetPriceId(provider, subscription, updatedPlanType);","sourceCodeStart":716,"sourceCodeEnd":752,"githubUrl":"https://github.com/bitwarden/server/blob/e93b962371d80964556f5590c6615f5160a437a1/bitwarden_license/src/Commercial.Core/Billing/Providers/Services/ProviderBillingService.cs#L716-L752","documentation":"Error \"Provider seat minimums must be at least 0.\" thrown in bitwarden/server.","triggerScenarios":"Thrown when a request attempts to set a provider plan's seat minimum to a negative value while creating or updating a provider subscription.","commonSituations":"See trigger scenarios.","solutions":["Set every provider plan seat minimum to 0 or a positive value and resubmit.","Check the request payload for omitted seat fields that serialize as negative defaults, and explicitly set them to 0."],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"e93b962371d80964556f5590c6615f5160a437a1","analyzedAt":"2026-08-13T14:22:19.382Z","schemaVersion":2},"datasetVersion":"2026-08-13T19:17:28.613Z"}