403 rather than 500 when the compliance boundary refuses

FeatureSecurityService
Shipped
August 3, 2026 at 2:01 AM UTC
Author
Kamo
Commit
fba916f

Two call sites of featureService.enableFeature now understand the HIPAA boundary: - /enable maps PhiModuleNotPermittedException to 403 carrying the reason, mirroring the AppliedModelViolationException handling directly above it. Without this the broad catch below turned a deliberate policy refusal into a 500. - The auto-enable loop in the listing path pre-checks with isPhiPermitted and skips. It runs over every completed ServiceType while merely *listing* an organization's features, so throwing on the first blocked module would have made the features page unloadable for a PHI tenant instead of hiding one entry. Inert today — every organization is handlesPhi=false.

All changes

Like what you see shipping?

Every one of these updates lands in your workspace automatically. Start free and watch it grow week after week.

Start Free ForeverView Pricing