Skip to content

Remove Zod from named errors#26982

Merged
kitlangton merged 2 commits into
devfrom
cleanup/named-error-effect-schema
May 12, 2026
Merged

Remove Zod from named errors#26982
kitlangton merged 2 commits into
devfrom
cleanup/named-error-effect-schema

Conversation

@kitlangton
Copy link
Copy Markdown
Contributor

Summary

  • Moves NamedError from Zod-backed schemas to Effect Schema while preserving the legacy { name, data } wire shape.
  • Converts direct NamedError.create(...) call sites to Effect Schema fields and makes namedSchemaError return real NamedError instances.
  • Keeps config issue metadata and void-error JSON compatibility intact.

Verification

  • bun typecheck in packages/core
  • bun typecheck in packages/opencode
  • bun run test -- test/util/error.test.ts test/cli/error.test.ts test/server/sdk-error-shape.test.ts test/server/httpapi-schema-error-body.test.ts test/session/retry.test.ts test/config/config.test.ts test/skill/skill.test.ts test/storage/storage.test.ts test/project/worktree.test.ts
  • bunx prettier --check ... on changed files
  • bunx oxlint ... on changed files (warnings only, existing patterns)
  • pre-push bun turbo typecheck

@kitlangton kitlangton merged commit 28f38fc into dev May 12, 2026
10 checks passed
@kitlangton kitlangton deleted the cleanup/named-error-effect-schema branch May 12, 2026 13:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant