Skip to content

Commit 36a050e

Browse files
chore: print error when parsing synthetics.config.ts (#996)
* Print error when parsing synthetics.config.ts 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`. * lint --------- Co-authored-by: Shahzad <[email protected]>
1 parent 601c5dc commit 36a050e

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/config.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,9 @@ function readAndParseConfig(configPath) {
8484
const requiredModule = require(configPath);
8585
return interopRequireDefault(requiredModule).default;
8686
} catch (e) {
87-
throw new Error('Unable to read synthetics config: ' + configPath);
87+
throw new Error(
88+
'Unable to read synthetics config: ' + configPath + '\n' + e
89+
);
8890
}
8991
}
9092

0 commit comments

Comments
 (0)