1
0
mirror of synced 2025-12-22 11:26:57 -05:00

Display the reason for Heroku AppSetup failure (#21683)

This commit is contained in:
James M. Greene
2021-09-23 10:51:50 -05:00
committed by GitHub
parent e4f7746d85
commit e29a965405

View File

@@ -241,10 +241,17 @@ export default async function deployToStaging({
} }
if (appSetup && appSetup.status === 'failed') { if (appSetup && appSetup.status === 'failed') {
const manifestErrors = appSetup.manifest_errors || []
const hasManifestErrors = Array.isArray(manifestErrors) && manifestErrors.length > 0
const manifestErrorMessage = hasManifestErrors
? `\nManifest errors:\n - ${manifestErrors.join('\n - ')}`
: ''
throw new Error( throw new Error(
`Failed to setup app after ${Math.round( `Failed to setup app after ${Math.round(
(Date.now() - appSetupStartTime) / 1000 (Date.now() - appSetupStartTime) / 1000
)} seconds. See Heroku logs for more information:\n${logUrl}` )} seconds.
Reason: ${appSetup.failure_message}${manifestErrorMessage}
See Heroku logs for more information:\n${logUrl}`
) )
} }