From 25fe08058278709955c8562d3143c4091959680d Mon Sep 17 00:00:00 2001 From: Mauricio Siu <47042324+Siumauricio@users.noreply.github.com> Date: Sat, 20 Jul 2024 13:37:12 -0600 Subject: [PATCH] fix(traefik): add try catch when starting service --- server/api/routers/settings.ts | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/server/api/routers/settings.ts b/server/api/routers/settings.ts index 19299c113..69f5655ce 100644 --- a/server/api/routers/settings.ts +++ b/server/api/routers/settings.ts @@ -58,8 +58,13 @@ export const settingsRouter = createTRPCRouter({ return true; }), reloadTraefik: adminProcedure.mutation(async () => { - await stopService("dokploy-traefik"); - await startService("dokploy-traefik"); + try { + await stopService("dokploy-traefik"); + await startService("dokploy-traefik"); + } catch (err) { + console.error(err); + } + return true; }), cleanUnusedImages: adminProcedure.mutation(async () => {