Skip to content

refactor: improve validation error structure#13

Open
johnf wants to merge 1 commit intomainfrom
refactor/error-handling
Open

refactor: improve validation error structure#13
johnf wants to merge 1 commit intomainfrom
refactor/error-handling

Conversation

@johnf
Copy link
Copy Markdown
Collaborator

@johnf johnf commented Mar 27, 2026

Summary

  • Change createValidationError to accept structured violations ({ field, message }) instead of plain strings
  • Map Zod validation errors to structured format in the error handler
  • Remove commented-out rate limit error

Test plan

  • pnpm lint passes
  • pnpm test passes
  • Validation errors now return { violations: [{ field, message }] } in details

@github-actions
Copy link
Copy Markdown

github-actions bot commented Mar 27, 2026

Coverage Report

Status Category Percentage Covered / Total
🔵 Lines 100% (🎯 100%) 330 / 330
🔵 Statements 100% (🎯 100%) 341 / 341
🔵 Functions 100% (🎯 100%) 52 / 52
🔵 Branches 100% (🎯 100%) 159 / 159
File Coverage
File Stmts Branches Functions Lines Uncovered Lines
Changed Files
src/app.ts 100% 100% 100% 100%
src/utils/errors.ts 100% 100% 100% 100%
Generated in workflow #57 for commit 253aa48 by the Vitest Coverage Report Action

Change createValidationError to accept structured violations with field
and message instead of plain strings. Remove commented-out rate limit
error.
@johnf johnf force-pushed the refactor/error-handling branch from 4df54ab to 253aa48 Compare March 27, 2026 05:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants