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

Sensible error messages for CallDevToolsProtocolMethodAsync() exceptions #1609

Closed
mikernet opened this issue Aug 5, 2021 · 3 comments
Closed
Labels
feature request feature request tracked We are tracking this work internally.

Comments

@mikernet
Copy link

mikernet commented Aug 5, 2021

Calls to CallDevToolsProtocolMethodAsync() are impossible to debug because if ANYTHING goes wrong, it just throws an ArgumentException with its default message instead of relaying the dev tools protocol error in the message.

When you call the methods in the browser dev tools, it shows actual error messages, i.e:

image

image

image

When you call CallDevToolsProtocolMethodAsync() it throws ArgumentException with the same "Value does not fall within the expected range" message regardless of whether the dev tools method name was not found, or the method parameter was missing a required value, or a parameter value was the wrong type, or if an exception happened while it was executing like some of the examples above...etc.

Shouldn't the error message be passed along to the exception? The error code should probably also be passed along so that tools can handle different errors accordingly.

AB#35187011

@mikernet mikernet added the feature request feature request label Aug 5, 2021
@mikernet mikernet changed the title Sensible error messages for CallDevToolsMethodAsync() exceptions Sensible error messages for CallDevToolsProtocolMethodAsync() exceptions Aug 5, 2021
@champnic champnic added the tracked We are tracking this work internally. label Aug 10, 2021
@champnic
Copy link
Member

Thanks for this feature request @mikernet - I've added it to our backlog. This could definitely be improved and should return the actual error messages from the calls.

@exchange321
Copy link

Hi, we are having the same issue too. Is there any update to this?

@champnic
Copy link
Member

We just checked in a fix to have "result" be populated with the error details. This should be available on runtimes 105.0.1315.0+ if you want to try it. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature request feature request tracked We are tracking this work internally.
Projects
None yet
Development

No branches or pull requests

3 participants