improved json rpc error reporting