Report argument deserialization failures more precisely #402
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
BEFORE
AFTER
In addition to the improved message, the
RemoteMethodNotFoundException
type now contains extra data with all the type, message and callstack info for all inner exceptions similar to how it would if the exception had been thrown from the RPC server method itself. The full JSON-RPC error message sent to the client and accessible through this exception is:When there are multiple overloads and all of them fail, an exception for each overload that failed will be included so the investigation can consider why each overload was a mismatch.
When one overload fails but another overload succeeds, the succeeding overload is invoked as before. But even in that case, we now trace a warning message regarding the conversion failure as it occurs.
Fixes #400