mirror of
https://github.com/diegosouzapw/OmniRoute.git
synced 2026-08-04 06:12:10 +03:00
The omniroute_web_fetch input schema (#4510) used z.string().min(1, "URL is required") for the url field, but .min() only fires for an empty string. A MISSING url (webFetchInput.parse({})) fails the z.string() type check first and emitted the default Zod v4 message ("expected string, received undefined"), so the existing test 'webFetchInput rejects missing URL' (expecting /URL is required/) failed on the full unit suite — a latent base red on release/v3.8.33. Add the custom message to the type check: z.string({ error: "URL is required" }). Now both the missing-field and empty-string cases emit 'URL is required'; a valid url still passes. No other web_fetch behavior changes. Co-authored-by: Diego Rodrigues de Sa e Souza <diego.souza@cdwasolutions.com.br> Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>