Skip to content

🪢 Open source agent evals & observability: Trace, evaluate, and improve LLM applications with one open platform.

chore: skip body validation for bullmq GET requests (#8490)

Steffen Schmitz129693fb69bf
diff --git a/web/src/pages/api/admin/bullmq/index.ts b/web/src/pages/api/admin/bullmq/index.ts
index 13990f5e28..88fb4bb8a0 100644
--- a/web/src/pages/api/admin/bullmq/index.ts
+++ b/web/src/pages/api/admin/bullmq/index.ts
@@ -56,13 +56,6 @@ export default async function handler(
return;
}
- const body = ManageBullBody.safeParse(req.body);
-
- if (!body.success) {
- res.status(400).json({ error: body.error });
- return;
- }
-
if (req.method === "GET") {
const queues: string[] = Object.values(QueueName);
queues.push(...IngestionQueue.getShardNames());
@@ -94,6 +87,13 @@ export default async function handler(
return res.status(200).json(queueCounts);
}
+ const body = ManageBullBody.safeParse(req.body);
+
+ if (!body.success) {
+ res.status(400).json({ error: body.error });
+ return;
+ }
+
if (req.method === "POST" && body.data.action === "remove") {
logger.info(
`Removing jobs for queues ${body.data.queueNames.join(", ")}`,