// runtime/subsystems/integration/integration-errors.ts
var MissingTenantIdError = class extends Error {
  name = "MissingTenantIdError";
  constructor(operation) {
    super(
      `Missing tenantId for integration operation '${operation}'. IntegrationModule is configured with multiTenant: true \u2014 every call must include a non-null tenantId. Either pass the tenantId or disable multi-tenancy on the module.`
    );
  }
};
function assertTenantId(tenantId, options) {
  if (!options.multiTenant) return;
  if (tenantId === void 0 || tenantId === null) {
    throw new MissingTenantIdError(options.operation);
  }
}

export {
  MissingTenantIdError,
  assertTenantId
};
//# sourceMappingURL=chunk-MZ6GV4YF.js.map