Do not throw in backend.stop, if start failed

Signed-off-by: Fredrik Adelöw <freben@gmail.com>
This commit is contained in:
Fredrik Adelöw
2023-08-02 15:17:29 +02:00
parent 5623a818b9
commit e65c4896f7
2 changed files with 11 additions and 1 deletions
+5
View File
@@ -0,0 +1,5 @@
---
'@backstage/backend-app-api': patch
---
Do not throw in backend.stop, if start failed
@@ -259,7 +259,12 @@ export class BackendInitializer {
if (!this.#startPromise) {
return;
}
await this.#startPromise;
try {
await this.#startPromise;
} catch (error) {
// The startup failed, but we may still want to do cleanup so we continue silently
}
const lifecycleService = await this.#getRootLifecycleImpl();
await lifecycleService.shutdown();