From e58262b025d7e8387b44cc13ceda48697373e54a Mon Sep 17 00:00:00 2001 From: Alex Crome Date: Thu, 11 Aug 2022 12:38:08 +0100 Subject: [PATCH] Include stack trace on startup errors in create app Updated the backend index.ts in create-app to log the error as an object, rather than a string. This causes the error to include a stack trace, along with the error message, as well as bringing it in line with the main app in the bakstage repo. Signed-off-by: Alex Crome --- .../templates/default-app/packages/backend/src/index.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/create-app/templates/default-app/packages/backend/src/index.ts b/packages/create-app/templates/default-app/packages/backend/src/index.ts index 70bc66bcdd..ef05fa50ee 100644 --- a/packages/create-app/templates/default-app/packages/backend/src/index.ts +++ b/packages/create-app/templates/default-app/packages/backend/src/index.ts @@ -104,6 +104,6 @@ async function main() { module.hot?.accept(); main().catch(error => { - console.error(`Backend failed to start up, ${error}`); + console.error('Backend failed to start up', error); process.exit(1); });