ga4-export-fixer 0.1.5-dev.2 → 0.1.5-dev.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/utils.js +5 -0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ga4-export-fixer",
3
- "version": "0.1.5-dev.2",
3
+ "version": "0.1.5-dev.3",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "files": [
package/utils.js CHANGED
@@ -414,6 +414,7 @@ const processDate = (dateInput) => {
414
414
  * @throws {Error} If any configuration value is invalid or missing.
415
415
  */
416
416
  const validateConfig = (config) => {
417
+ try {
417
418
  if (!config || typeof config !== 'object' || Array.isArray(config)) {
418
419
  throw new Error(`config must be a non-null object. Received: ${JSON.stringify(config)}`);
419
420
  }
@@ -638,6 +639,10 @@ const validateConfig = (config) => {
638
639
  }
639
640
  }
640
641
  }
642
+ } catch (e) {
643
+ e.message = `Config validation: ${e.message}`;
644
+ throw e;
645
+ }
641
646
  };
642
647
 
643
648
  module.exports = {