Skip to content

Commit 846ac06

Browse files
tanshanshanclaude
andcommitted
fix(config): guard nullable record in appendNumericBoundHint call
ClawSweeper P1: `record` from `toIssueRecord()` can be null, but `appendNumericBoundHint` expects a non-null `UnknownIssueRecord`. Guard with a ternary so the original message is returned when record is null (which only happens for malformed/empty issues that already produce generic "Invalid input" messages). Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent 68cdf87 commit 846ac06

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/config/validation.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -609,7 +609,7 @@ function mapZodIssueToConfigIssue(issue: unknown): ConfigValidationIssue {
609609
// Numeric ceiling/floor hints (too_big / too_small with numeric origin).
610610
// Append a parenthesized bound alongside Zod's native message,
611611
// matching the clarity that enum/union rejections get via (allowed: …).
612-
const enrichedMessage = appendNumericBoundHint(message, record);
612+
const enrichedMessage = record ? appendNumericBoundHint(message, record) : message;
613613

614614
const allowedValuesSummary = summarizeAllowedValues(collectAllowedValuesFromUnknownIssue(issue));
615615

0 commit comments

Comments
 (0)