Skip to content

url.href = "garbage"; should return TypeError #37

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

Open
sujayakar opened this issue Feb 4, 2025 · 0 comments
Open

url.href = "garbage"; should return TypeError #37

sujayakar opened this issue Feb 4, 2025 · 0 comments

Comments

@sujayakar
Copy link
Contributor

Currently, it returns an Error with a somewhat convex-specific string of BadUrl: Could not parse {url}`

To match the spec, we'd need our syscall to return a more complex json object and have the JS side convert/throw behavior that matches the public behavior.

Probably not super high pri - customers parsing error conditions does not seem super likely.

We shouldn't be changing these (they're often part of the spec for these JS builtins).

For some of these, we might be able to return something like { success: false, message: "..." } from the op and throw the error in JS

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

No branches or pull requests

1 participant