Skip to content

fix: Don't bail on invalid params#113

Closed
benbrandt wants to merge 10 commits intomainfrom
invalid-params
Closed

fix: Don't bail on invalid params#113
benbrandt wants to merge 10 commits intomainfrom
invalid-params

Conversation

@benbrandt
Copy link
Copy Markdown
Member

  • Restructure control flow
  • cleanup error
  • Cleanup and add test

Copy link
Copy Markdown
Contributor

@nikomatsakis nikomatsakis left a comment

Choose a reason for hiding this comment

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

I think this PR looks good. I like the tests. I'd be happy to merge it

However, I feel like the overall approach is kind of fragile. I feel like it'd be nice to just put ? in handlers and not have to think too hard. I wonder if what we ought to do instead is to change the way that we deal with errors from handlers (and maybe tasks and other user-supplied code) so that, instead of propagating them, we actually just swallow them and report them back to the other side? Kind of like how a web server will catch an unhandled exception and recover?

We could have some sentinel type for a "fatal error" that truly propagates out.

@benbrandt
Copy link
Copy Markdown
Member Author

Closing in favor of #114

@benbrandt benbrandt closed this Apr 16, 2026
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