better error handling in jsonrpc requests
Merge pull request #400 from timrichardson/issues/1898s

better error handling in jsonrpc requests