Skip to content

Conversation

@jackyzha0
Copy link
Member

Why

  • people kept misusing unwrapOrThrow in production procedures

What changed

  • unexport unwrapOrThrow
  • add a simple regression test for ctx.cancel in a union-ed case

Versioning

  • Breaking protocol change
  • Breaking ts/js API change

@jackyzha0 jackyzha0 requested a review from a team as a code owner March 27, 2025 17:34
@jackyzha0 jackyzha0 requested review from blast-hardcheese, daweifeng-replit and masad-frost and removed request for a team March 27, 2025 17:34
ProcedureHandlerContext,
} from './context';
export { Ok, Err, unwrapOrThrow } from './result';
export { Ok, Err } from './result';
Copy link
Member

Choose a reason for hiding this comment

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

By misusing you mean they never attempt to handle expected errors/laziness? That's probably right, and I might be an offender.

Copy link
Member

@masad-frost masad-frost left a comment

Choose a reason for hiding this comment

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

I don't see a types update!

@masad-frost
Copy link
Member

oh i see what you mean

@jackyzha0 jackyzha0 merged commit 161d5f7 into main Mar 27, 2025
6 checks passed
@jackyzha0 jackyzha0 deleted the jackyzha0/unexport-unwrap-or-throw-types branch March 27, 2025 23:21
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.

4 participants