Openstatus www.openstatus.dev
6
fork

Configure Feed

Select the types of activity you want to include in your feed.

✨ enhance run monitor with no-wait coercion and improved error logging

+3 -2
+3 -1
apps/server/src/v1/monitors/run/post.ts
··· 23 23 params: ParamsSchema, 24 24 query: z 25 25 .object({ 26 - "no-wait": z 26 + "no-wait": z.coerce 27 27 .boolean() 28 28 .optional() 29 29 .openapi({ ··· 109 109 .array(selectMonitorStatusSchema) 110 110 .safeParse(monitorStatusData); 111 111 if (!monitorStatus.success) { 112 + console.log(monitorStatus.error); 112 113 throw new HTTPException(400, { message: "Something went wrong" }); 113 114 } 114 115 ··· 192 193 const data = z.array(HTTPTriggerResult).safeParse(result); 193 194 194 195 if (!data.success) { 196 + console.log(data.error); 195 197 throw new HTTPException(400, { message: "Something went wrong" }); 196 198 } 197 199
-1
apps/server/src/v1/monitors/schema.ts
··· 236 236 export const HTTPTriggerResult = z.object({ 237 237 status: z.number(), 238 238 latency: z.number(), 239 - headers: z.record(z.string()), 240 239 timestamp: z.number(), 241 240 timing: timingSchema, 242 241 body: z.string().optional().nullable(),