Skip to content

refactor: don't constrain error types#23

Merged
madkarmaa merged 1 commit into
madkarmaa:mainfrom
mkantor:generalize-errors
May 25, 2026
Merged

refactor: don't constrain error types#23
madkarmaa merged 1 commit into
madkarmaa:mainfrom
mkantor:generalize-errors

Conversation

@mkantor

@mkantor mkantor commented May 25, 2026

Copy link
Copy Markdown
Contributor

What changed?

Error types have been generalized. Users of Result are no longer required to have a code property in their errors.

Why?

It makes the library usable in more scenarios and aligns Result closer with Rust's version.

Tradeoffs / edge cases

Some PanicError messages have changed (but I added a cause to make up for it). Result's stringification has also slightly changed.

Checklist

  • Tests added or updated
  • bun run typecheck && bun run test passes

@mkantor mkantor requested a review from madkarmaa as a code owner May 25, 2026 14:01
@madkarmaa madkarmaa added the major Will result in a major version bump label May 25, 2026
@madkarmaa madkarmaa changed the title feat: don't constrain error types refactor: don't constrain error types May 25, 2026

@madkarmaa madkarmaa left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@madkarmaa madkarmaa merged commit 627a0d1 into madkarmaa:main May 25, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

major Will result in a major version bump

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants