Small fix to jsonrpc error handling