Merge pull request #12174 from backstage/rugvip/details

scaffolder: show dry-run error cause
This commit is contained in:
Patrik Oldsberg
2022-06-21 10:08:27 +02:00
committed by GitHub
2 changed files with 16 additions and 5 deletions
@@ -212,11 +212,17 @@ export function TemplateEditorFormDirectoryEditorDryRun(
return;
}
await dryRun.execute({
templateContent: selectedFile.content,
values: data,
files: directoryEditor.files,
});
try {
await dryRun.execute({
templateContent: selectedFile.content,
values: data,
files: directoryEditor.files,
});
setErrorText();
} catch (e) {
setErrorText(String(e.cause || e));
throw e;
}
};
const content =