Merge pull request #13108 from afscrome/IncludeStackTraceInCrateAppStartupFailure

Include stack trace on startup errors in create app
This commit is contained in:
Patrik Oldsberg
2022-08-12 11:58:15 +02:00
committed by GitHub
2 changed files with 15 additions and 1 deletions
+14
View File
@@ -0,0 +1,14 @@
---
'@backstage/create-app': patch
---
Updated backend to write stack trace when the backend fails to start up.
To apply this change to your Backstage installation, make the following change to `packages/backend/src/index.ts`
```diff
cors:
origin: http://localhost:3000
- console.error(`Backend failed to start up, ${error}`);
+ console.error('Backend failed to start up', error);
```
@@ -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);
});