fix Action success log being triggered even when there is error.

This commit is contained in:
mbecker20
2024-11-12 19:43:55 -05:00
parent 2b6b8a21ec
commit 23c1a08c87

View File

@@ -228,7 +228,9 @@ const komodo = KomodoClient('{base_url}', {{
async function main() {{{contents}}}
main().catch(error => {{
main()
.then(() => console.log('🦎 Action completed successfully 🦎'))
.catch(error => {{
console.error('🚨 Action exited early with errors 🚨')
if (error.status !== undefined && error.result !== undefined) {{
console.error('Status:', error.status);
@@ -237,7 +239,7 @@ main().catch(error => {{
console.error(JSON.stringify(error, null, 2));
}}
Deno.exit(1)
}}).then(() => console.log('🦎 Action completed successfully 🦎'));"
}});"
)
}