From 525a711c55a8ff5646663b5c7c253647cab304a7 Mon Sep 17 00:00:00 2001 From: Mauricio Siu <47042324+Siumauricio@users.noreply.github.com> Date: Sat, 6 Jul 2024 11:55:21 -0600 Subject: [PATCH] refactor(settings): throw error and log the error --- server/utils/docker/utils.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/server/utils/docker/utils.ts b/server/utils/docker/utils.ts index 81781ee1f..1747f4ed2 100644 --- a/server/utils/docker/utils.ts +++ b/server/utils/docker/utils.ts @@ -94,6 +94,7 @@ export const cleanUpUnusedImages = async () => { await execAsync("docker image prune --all --force"); } catch (error) { console.error(error); + throw error; } }; @@ -102,6 +103,7 @@ export const cleanStoppedContainers = async () => { await execAsync("docker container prune --force"); } catch (error) { console.error(error); + throw error; } }; @@ -110,6 +112,7 @@ export const cleanUpUnusedVolumes = async () => { await execAsync("docker volume prune --force"); } catch (error) { console.error(error); + throw error; } }; @@ -143,6 +146,7 @@ export const startService = async (appName: string) => { await execAsync(`docker service scale ${appName}=1 `); } catch (error) { console.error(error); + throw error; } };