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

JsonRpc wraps failure to deserialize argument with misleading exception #400

Closed
AArnott opened this issue Dec 31, 2019 · 1 comment · Fixed by #402
Closed

JsonRpc wraps failure to deserialize argument with misleading exception #400

AArnott opened this issue Dec 31, 2019 · 1 comment · Fixed by #402
Assignees
Labels
Milestone

Comments

@AArnott
Copy link
Member

AArnott commented Dec 31, 2019

When deserializing arguments, if the formatter throws an exception, JsonRpc simply reports that an argument wasn't supplied. Can we do better to improve diagnosability?

As described by:

dotnet/roslyn#39429
https://github.com/dotnet/winforms-designer/issues/923#issuecomment-568132312

@AArnott AArnott added the bug label Dec 31, 2019
@AArnott AArnott added this to the v2.3 milestone Dec 31, 2019
@AArnott AArnott self-assigned this Dec 31, 2019
@AArnott
Copy link
Member Author

AArnott commented Jan 2, 2020

I have a unit test that repros the problem. Sadly, the exception details aren't even preserved in the trace log.

AArnott added a commit to AArnott/vs-streamjsonrpc that referenced this issue Jan 2, 2020
Instead of responding with a general exception that claims the client didn't send an argument for a given parameter, we now report that an argument deserialization failed, and include all inner exception details.

Fixes microsoft#400
AArnott added a commit to AArnott/vs-streamjsonrpc that referenced this issue Jan 3, 2020
Instead of responding with a general exception that claims the client didn't send an argument for a given parameter, we now report that an argument deserialization failed, and include all inner exception details.

Fixes microsoft#400
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant