Commit c393abbf authored by Michele Tartara's avatar Michele Tartara

Log RPC errors from inside executeRpcCall

executeRpcCall is the function to be used for executing RPCs, so it makes sense
to use it as the single point for logging all thte RPC call errors.

Fixes Issue 293.
Signed-off-by: default avatarMichele Tartara <>
Reviewed-by: default avatarKlaus Aehlig <>
parent a246ce76
......@@ -233,7 +233,6 @@ collectLiveData True cfg nodes = do
Nothing -> (n : bn, gn, em)
(bnodes, gnodes, emap) = foldr step ([], [], []) nodes
rpcres <- executeRpcCall gnodes (RpcCallNodeInfo vgs hvs (Map.fromList emap))
logRpcErrors rpcres
-- FIXME: The order of nodes in the result could be different from the input
return $ zip bnodes (repeat $ Left (RpcResultError "Broken configuration"))
++ rpcres
......@@ -231,7 +231,9 @@ executeRpcCall nodes call = do
Ok r -> return r
-- now parse the replies
let results'' = map (parseHttpReply call) results'
return $ zip nodes results''
pairedList = zip nodes results''
logRpcErrors pairedList
return pairedList
-- | Helper function that is used to read dictionaries of values.
sanitizeDictResults :: [(String, J.Result a)] -> ERpcError [(String, a)]
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment