Change exception message used when MissingMemberHandling.Error is active #2997
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.
Changes the exception message
Could not find member '{0}' on object of type '{1}'
toThe JSON property '{0}' does not exist on object of type '{1}'
The existing message is not very clear about if the problem is a missing property in the JSON string or if it is missing in the .NET object.
The new message is more clear that a JSON property exists and it does not correspond to a member on the .NET object.
While this is not too difficult to figure out for a developer well versed in the library, in my use case I show these messages to administrators who are likely thinking that "Could not find" means they have to add that thing to the json string they entered.
Also, my editor removed some trailing spaces as you can see in the diffs. Let me know if you want me to undo those whitespace changes.