mirror of
https://github.com/Dokploy/dokploy
synced 2025-06-26 18:27:59 +00:00
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.
This commit is contained in:
@@ -139,9 +139,7 @@ export const ShowSchedules = ({ applicationId }: Props) => {
|
|||||||
.catch((error) => {
|
.catch((error) => {
|
||||||
console.log(error);
|
console.log(error);
|
||||||
toast.error(
|
toast.error(
|
||||||
error instanceof Error
|
`Error running schedule: ${error}`,
|
||||||
? error.message
|
|
||||||
: "Error running schedule",
|
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
}}
|
}}
|
||||||
|
|||||||
@@ -99,7 +99,6 @@ export const scheduleRouter = createTRPCRouter({
|
|||||||
await runCommand(input.scheduleId);
|
await runCommand(input.scheduleId);
|
||||||
return true;
|
return true;
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.log(error);
|
|
||||||
throw new TRPCError({
|
throw new TRPCError({
|
||||||
code: "INTERNAL_SERVER_ERROR",
|
code: "INTERNAL_SERVER_ERROR",
|
||||||
message:
|
message:
|
||||||
|
|||||||
Reference in New Issue
Block a user