[tests] improve error message when a deploy fails (#7864)

improve error message
This commit is contained in:
Sean Massa
2022-05-23 17:02:29 -05:00
committed by GitHub
parent cd7dcc6731
commit a5a990995c

View File

@@ -88,7 +88,9 @@ async function nowDeploy(bodies, randomness, uploadNowJson) {
const { readyState } = deployment; const { readyState } = deployment;
if (readyState === 'ERROR') { if (readyState === 'ERROR') {
logWithinTest('state is ERROR, throwing'); logWithinTest('state is ERROR, throwing');
const error = new Error(`State of https://${deploymentUrl} is ERROR`); const error = new Error(
`State of https://${deploymentUrl} is ERROR: ${deployment.errorMessage}`
);
error.deployment = deployment; error.deployment = deployment;
throw error; throw error;
} }