{"record":{"id":"c305c1dee6728fb5","repo":"bitwarden/server","slug":"something-went-wrong-with-your-request-please-con","errorCode":null,"errorMessage":"Something went wrong with your request. Please contact support.","messagePattern":"Something went wrong with your request\\. Please contact support\\.","errorType":"exception","errorClass":"BillingException","httpStatus":500,"severity":"error","filePath":"bitwarden_license/src/Commercial.Core/Billing/Providers/Services/BusinessUnitConverter.cs","lineNumber":412,"sourceCode":"        if (providerUser is not\n            {\n                Type: ProviderUserType.ProviderAdmin,\n                Status: ProviderUserStatusType.Invited\n            })\n        {\n            Fail(\"Provider admin has not been invited.\");\n        }\n\n        var providerOrganization = await providerOrganizationRepository.GetByOrganizationId(organization.Id);\n\n        return (subscription, provider, providerOrganization!, providerUser);\n\n        [DoesNotReturn]\n        void Fail(string scopedError)\n        {\n            logger.LogError(\"Could not finalize business unit conversion for organization ({OrganizationID}): {Error}\",\n                organization.Id, scopedError);\n            throw new BillingException();\n        }\n    }\n\n    private async Task<List<string>?> ValidateInitiationAsync(\n        Organization organization,\n        User? user)\n    {\n        var problems = new List<string>();\n\n        if (organization.PlanType.GetProductTier() != ProductTierType.Enterprise)\n        {\n            problems.Add(\"Organization must be on an enterprise plan.\");\n        }\n\n        if (organization.UseSecretsManager)\n        {\n            problems.Add(\"Organization is subscribed to Secrets Manager. Please contact Customer Support to convert this organization to a business unit.\");\n        }","sourceCodeStart":394,"sourceCodeEnd":430,"githubUrl":"https://github.com/bitwarden/server/blob/e93b962371d80964556f5590c6615f5160a437a1/bitwarden_license/src/Commercial.Core/Billing/Providers/Services/BusinessUnitConverter.cs#L394-L430","documentation":"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 (...)'.","triggerScenarios":"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.","commonSituations":"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.","solutions":["Read the server log line 'Could not finalize business unit conversion for organization (...): {Error}' to identify the exact scoped reason, then fix that precondition.","Re-initiate the conversion (new invite token) if the token expired.","Ensure the acting user is a confirmed org member and an invited ProviderAdmin of a pending BusinessUnit provider before finalizing."],"exampleFix":"// before\nawait businessUnitConverter.FinalizeAsync(organization, user, token, ...);\n\n// after — pre-validate the preconditions the converter checks\nvar orgUser = await organizationUserRepository.GetByOrganizationAsync(org.Id, user.Id);\nif (orgUser?.Status != OrganizationUserStatusType.Confirmed)\n    return BadRequest(\"Confirm your org membership first.\");\nvar provider = await providerRepository.GetByOrganizationIdAsync(org.Id);\nif (provider is not { Type: ProviderType.BusinessUnit, Status: ProviderStatusType.Pending })\n    return BadRequest(\"Provider is not a pending business unit.\");\nawait businessUnitConverter.FinalizeAsync(organization, user, token, ...);","handlingStrategy":"try-catch","validationCode":"var orgUser = await organizationUserRepository.GetByOrganizationAsync(org.Id, user.Id);\nif (orgUser?.Status != OrganizationUserStatusType.Confirmed) return BadRequest(\"Org membership not confirmed.\");","typeGuard":null,"tryCatchPattern":"try { await converter.FinalizeAsync(...); }\ncatch (BillingException) { /* read logs for scoped reason; re-initiate conversion */ }","preventionTips":["Treat the BillingException as opaque and always inspect the logged scoped reason.","Re-initiate the conversion to refresh tokens/membership state."],"tags":["billing","business-unit","conversion","opaque-exception","logs"],"backgroundTag":null,"analyzedSha":"e93b962371d80964556f5590c6615f5160a437a1","analyzedAt":"2026-08-13T14:22:19.382Z","schemaVersion":2},"datasetVersion":"2026-08-13T19:17:28.613Z"}