Skip to content

api: Return typed Mermaid validation errors - #262

Merged
tridha643 merged 2 commits into
mainfrom
agent/typed-mermaid-errors-cee16138
Aug 24, 2026
Merged

api: Return typed Mermaid validation errors#262
tridha643 merged 2 commits into
mainfrom
agent/typed-mermaid-errors-cee16138

Conversation

@tridha643

@tridha643 tridha643 commented Aug 24, 2026

Copy link
Copy Markdown
Contributor

Rejects malformed Mermaid at the native write boundary and returns machine-readable recovery details while preserving the existing error string.

  • Adds stable validation and issue codes, parser diagnostics, request field locations, diagram types, and concrete retry steps.
  • Preserves current lazy parser loading and exports the validation result types from sideshow/server.
  • Covers rejection and non-persistence with API tests and Chromium/WebKit E2E tests.

Testing: npm test, npm run coverage, npm run test:worker, npm run typecheck, npm run lint, npm run format:check, npm run security:audit, and npx playwright test e2e/mermaid.spec.ts.

- include parser diagnostics and actionable retry steps in 400 responses
- cover rejection and non-persistence through API and browser tests
@tridha643
tridha643 requested a review from benvinegar August 24, 2026 20:11
- rename the public issue location to requestPath
- distinguish internal surface request locations from Zod schema paths
@tridha643
tridha643 merged commit 6c1073a into main Aug 24, 2026
10 checks passed
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.

1 participant