Skip to content

Commit

Permalink
Print error when parsing synthetics.config.ts
Browse files Browse the repository at this point in the history
When `synthetics.config.ts` throws an error, `config.ts` doesn't give any clue about the root cause, it's better if we can print the original thrown `Error`.
  • Loading branch information
brunofarache authored Feb 5, 2025
1 parent 6ac8ce7 commit 2b04198
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ function readAndParseConfig(configPath) {
const requiredModule = require(configPath);
return interopRequireDefault(requiredModule).default;
} catch (e) {
throw new Error('Unable to read synthetics config: ' + configPath);
throw new Error('Unable to read synthetics config: ' + configPath + '\n' + e);
}
}

Expand Down

0 comments on commit 2b04198

Please sign in to comment.