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

Should we block exotic types from transmission in exceptions? #778

Open
AArnott opened this issue Mar 17, 2022 · 1 comment
Open

Should we block exotic types from transmission in exceptions? #778

AArnott opened this issue Mar 17, 2022 · 1 comment

Comments

@AArnott
Copy link
Member

AArnott commented Mar 17, 2022

When returning a JSON-RPC error response, I suspect it would be a good play to block transmission of any exotic types. This is primarily because exotic types tend to pin resources till the receiving side fulfills some contract (e.g. disposing of the received proxy), and in the exception case this is more likely to be missed.
While blocking such a thing would be a breaking change, it's unlikely anyone depends on it right now.

Consider that exceptions might be sent as arguments or return values (rather than thrown), and in such cases we may want to continue allowing exotic types.

@AArnott
Copy link
Member Author

AArnott commented Mar 17, 2022

CC: @matteo-prosperi. We should think about this with regard to generally marshalable types, but as I think this is a pre-existing problem, I figured I'd file an issue to resolve later rather than hold up your current PR.

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