Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

support encode and decode promise rejected with any value #57

Closed
wants to merge 2 commits into from

Conversation

cloudkite
Copy link

@cloudkite cloudkite commented Jan 29, 2025

allow throwing any type of value from promises, my reasoning is that JS and react support throwing any kind of value so this lines up with JS and react semantics/expectations

see remix-run/react-router#12676 for more background

@cloudkite cloudkite changed the title support encode and decode promise rejected with object support encode and decode promise rejected with non error value Jan 29, 2025
@cloudkite cloudkite changed the title support encode and decode promise rejected with non error value support encode and decode promise rejected with any Jan 29, 2025
@cloudkite cloudkite changed the title support encode and decode promise rejected with any support encode and decode promise rejected with object Jan 29, 2025
@cloudkite cloudkite changed the title support encode and decode promise rejected with object support encode and decode promise rejected with any value Jan 29, 2025
@jacob-ebey
Copy link
Owner

Implemented by #59

@cloudkite cloudkite closed this Feb 1, 2025
@cloudkite
Copy link
Author

Implemented by #59

Awesome looking forward to the new version.
May I suggest having at least one test case for rejecting a promise with a non error value. Just so that its captured that this behaviour is intentional.

@jacob-ebey
Copy link
Owner

Yep, here it is :)

test("rejected promise value", async () => {

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