From c69992c4f0c738bc5976c57630082735543531a9 Mon Sep 17 00:00:00 2001 From: Mauricio Siu <47042324+Siumauricio@users.noreply.github.com> Date: Fri, 2 May 2025 16:18:05 -0600 Subject: [PATCH] Improve error handling in ShowSchedules component and remove unnecessary logging in schedule API - Updated error messaging in the ShowSchedules component to provide more informative feedback when a schedule fails to run. - Removed redundant console logging in the schedule API to streamline error handling and improve code cleanliness. --- .../dashboard/application/schedules/show-schedules.tsx | 4 +--- apps/dokploy/server/api/routers/schedule.ts | 1 - 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/apps/dokploy/components/dashboard/application/schedules/show-schedules.tsx b/apps/dokploy/components/dashboard/application/schedules/show-schedules.tsx index 7da3a29e8..184b540af 100644 --- a/apps/dokploy/components/dashboard/application/schedules/show-schedules.tsx +++ b/apps/dokploy/components/dashboard/application/schedules/show-schedules.tsx @@ -139,9 +139,7 @@ export const ShowSchedules = ({ applicationId }: Props) => { .catch((error) => { console.log(error); toast.error( - error instanceof Error - ? error.message - : "Error running schedule", + `Error running schedule: ${error}`, ); }); }} diff --git a/apps/dokploy/server/api/routers/schedule.ts b/apps/dokploy/server/api/routers/schedule.ts index cdf3b90eb..b455006d1 100644 --- a/apps/dokploy/server/api/routers/schedule.ts +++ b/apps/dokploy/server/api/routers/schedule.ts @@ -99,7 +99,6 @@ export const scheduleRouter = createTRPCRouter({ await runCommand(input.scheduleId); return true; } catch (error) { - console.log(error); throw new TRPCError({ code: "INTERNAL_SERVER_ERROR", message: