bitwarden/server · error · BillingException

Something went wrong with your request. Please contact suppo

Error message

Something went wrong with your request. Please contact support.

What it means

A generic BillingException ('Something went wrong with your request. Please contact support.') thrown by the Fail() local function in BusinessUnitConverter finalization. Fail logs a scoped diagnostic reason (e.g. invalid email token, provider not a pending business unit, provider admin not invited/confirmed) and then throws a deliberately-opaque exception so the end user never sees the internal reason. The actual cause is in the server logs at the line 'Could not finalize business unit conversion for organization (...)'.

Source

Thrown at bitwarden_license/src/Commercial.Core/Billing/Providers/Services/BusinessUnitConverter.cs:412

        if (providerUser is not
            {
                Type: ProviderUserType.ProviderAdmin,
                Status: ProviderUserStatusType.Invited
            })
        {
            Fail("Provider admin has not been invited.");
        }

        var providerOrganization = await providerOrganizationRepository.GetByOrganizationId(organization.Id);

        return (subscription, provider, providerOrganization!, providerUser);

        [DoesNotReturn]
        void Fail(string scopedError)
        {
            logger.LogError("Could not finalize business unit conversion for organization ({OrganizationID}): {Error}",
                organization.Id, scopedError);
            throw new BillingException();
        }
    }

    private async Task<List<string>?> ValidateInitiationAsync(
        Organization organization,
        User? user)
    {
        var problems = new List<string>();

        if (organization.PlanType.GetProductTier() != ProductTierType.Enterprise)
        {
            problems.Add("Organization must be on an enterprise plan.");
        }

        if (organization.UseSecretsManager)
        {
            problems.Add("Organization is subscribed to Secrets Manager. Please contact Customer Support to convert this organization to a business unit.");
        }

View on GitHub (pinned to e93b962371)

Solutions

  1. Read the server log line 'Could not finalize business unit conversion for organization (...): {Error}' to identify the exact scoped reason, then fix that precondition.
  2. Re-initiate the conversion (new invite token) if the token expired.
  3. Ensure the acting user is a confirmed org member and an invited ProviderAdmin of a pending BusinessUnit provider before finalizing.

Example fix

// before
await businessUnitConverter.FinalizeAsync(organization, user, token, ...);

// after — pre-validate the preconditions the converter checks
var orgUser = await organizationUserRepository.GetByOrganizationAsync(org.Id, user.Id);
if (orgUser?.Status != OrganizationUserStatusType.Confirmed)
    return BadRequest("Confirm your org membership first.");
var provider = await providerRepository.GetByOrganizationIdAsync(org.Id);
if (provider is not { Type: ProviderType.BusinessUnit, Status: ProviderStatusType.Pending })
    return BadRequest("Provider is not a pending business unit.");
await businessUnitConverter.FinalizeAsync(organization, user, token, ...);
Defensive patterns

Strategy: try-catch

Validate before calling

var orgUser = await organizationUserRepository.GetByOrganizationAsync(org.Id, user.Id);
if (orgUser?.Status != OrganizationUserStatusType.Confirmed) return BadRequest("Org membership not confirmed.");

Try / catch

try { await converter.FinalizeAsync(...); }
catch (BillingException) { /* read logs for scoped reason; re-initiate conversion */ }

Prevention

When it happens

Trigger: Finalizing a business-unit conversion when any precondition fails: the email/invite token is invalid, the provider admin is not a confirmed organization member, the linked provider is not a pending BusinessUnit, or the provider admin has not been invited. Each calls Fail() which throws this.

Common situations: Token expired before the conversion was confirmed; the admin's org membership is not Confirmed; the provider was already activated (not Pending) or is the wrong type; the conversion was initiated against the wrong org/user.

Related errors


AI-assisted analysis of bitwarden/server@e93b962371 (2026-08-13). Data as JSON: /api/errors/c305c1dee6728fb5. Report an issue: GitHub.