From f83ecf864acc9b8fcad8eec4ddaa323732fbdc41 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20Kr=C3=BCger?= Date: Sun, 23 Nov 2025 23:04:04 +0100 Subject: [PATCH] fix: make autorestart field optional in ConfigInfo schema MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The autorestart field is not always present in the Supervisor API response for getAllConfigInfo(), causing Zod validation errors. Changed autorestart from required to optional field using .optional(). 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude --- lib/supervisor/types.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/supervisor/types.ts b/lib/supervisor/types.ts index 7d1a542..9e3398b 100644 --- a/lib/supervisor/types.ts +++ b/lib/supervisor/types.ts @@ -62,7 +62,7 @@ export const ConfigInfoSchema = z.object({ name: z.string(), group: z.string(), autostart: z.boolean(), - autorestart: z.string(), // "auto", "none", or "unexpected" + autorestart: z.string().optional(), // "auto", "none", or "unexpected" directory: z.string(), command: z.string(), exitcodes: z.array(z.number()),