Merge pull request #7947 from backstage/freben/service-builder-errors

Make sure that the server builder propagates init errors properly
This commit is contained in:
Fredrik Adelöw
2021-11-12 09:42:46 +01:00
committed by GitHub
2 changed files with 29 additions and 17 deletions
+12
View File
@@ -0,0 +1,12 @@
---
'@backstage/backend-common': patch
---
Make sure that server builder `start()` propagates errors (such as failing to bind to the required port) properly and doesn't resolve the promise prematurely.
After this change, the backend logger will be able to actually capture the error as it happens:
```
2021-11-11T10:54:21.334Z backstage info Initializing http server
2021-11-11T10:54:21.335Z backstage error listen EADDRINUSE: address already in use :::7000 code=EADDRINUSE errno=-48 syscall=listen address=:: port=7000
```