Exception: OpenLoam::MissingTenantError

Inherits:
Error
  • Object
show all
Defined in:
lib/open_loam/errors.rb

Overview

Raised whenever a tenant-scoped model is touched with no tenant in OpenLoam::Current. This is a structural guardrail, not a convention: forgetting the tenant context fails loudly (in tests, before it leaks) instead of silently returning or writing cross-tenant data.

Instance Method Summary collapse

Constructor Details

#initialize(msg = "No tenant set in OpenLoam::Current — wrap this call in OpenLoam.as_tenant(tenant) { ... }") ⇒ MissingTenantError

Returns a new instance of MissingTenantError.



9
10
11
# File 'lib/open_loam/errors.rb', line 9

def initialize(msg = "No tenant set in OpenLoam::Current — wrap this call in OpenLoam.as_tenant(tenant) { ... }")
  super
end