diff --git a/apps/hooks/src/index.ts b/apps/hooks/src/index.ts index b020e9f..c56f199 100644 --- a/apps/hooks/src/index.ts +++ b/apps/hooks/src/index.ts @@ -45,7 +45,7 @@ app.post("/hooks/catch/:userId/:workflowId", async (req, res) => { }); } catch (error: any) { console.log(error); - res.status(500).json({ + return res.status(500).json({ success: false, error: "Failed to process webhook" }); diff --git a/apps/http-backend/src/routes/userRoutes/userRoutes.ts b/apps/http-backend/src/routes/userRoutes/userRoutes.ts index 44d7d18..9f941bb 100644 --- a/apps/http-backend/src/routes/userRoutes/userRoutes.ts +++ b/apps/http-backend/src/routes/userRoutes/userRoutes.ts @@ -643,7 +643,7 @@ router.post("/executeWorkflow", userMiddleware, async (req: AuthRequest, res) => const parsedData = ExecuteWorkflow.safeParse(Data); console.log("This is the log data of execute work flow zod", parsedData.error) if (!parsedData.success) { - return res.status(statusCodes.FORBIDDEN).json({ + return res.status(statusCodes.BAD_REQUEST).json({ message: "Error in Zod Schma", Data: parsedData.error }) diff --git a/apps/web/app/workflows/[id]/page.tsx b/apps/web/app/workflows/[id]/page.tsx index c2c2327..1d3814c 100644 --- a/apps/web/app/workflows/[id]/page.tsx +++ b/apps/web/app/workflows/[id]/page.tsx @@ -34,7 +34,7 @@ export default function WorkflowCanvas() { toast.success("Execution Started") } catch (error: any) { - toast.error("Failed to save config"); + toast.error("Failed to Execute Workflow"); } finally {