diff --git a/bin/generate-test.mjs b/bin/generate-test.mjs index 5984c7f..c62a8aa 100755 --- a/bin/generate-test.mjs +++ b/bin/generate-test.mjs @@ -72,7 +72,13 @@ // Get Response from examples.http file const parser = new RestParser(); -await parser.readFile(`./${instancePath}/examples.http`); +try { + await parser.readFile(`./${instancePath}/examples.http`); +} catch (error) { + console.error(`No examples.http file found in ${instancePath}!\n`); + console.error(error); + process.exit(5); +} const instanceName = instancePath.replace(/\/$/, '').split('/').pop(); console.error(`Instance "${instanceName}" found.`);