Better fromJSON error handling #3
Labels
enhancement
New feature or request
good first issue
Good for newcomers
help wanted
Extra attention is needed
We should be handling any runtime errors that occur either form wrong JSON types being requested based on the input struct type or if a field does not exist on the remote side, these should all be handled in
fromJSON
with an exception thrown.Solution 1
What would make sense is we should type check each JSON field against a type we are going to, then
fromJSON
should throw a new type of PBException.The text was updated successfully, but these errors were encountered: