Skip to content
Snippets Groups Projects
Commit 6fddde87 authored by Agata Murawska's avatar Agata Murawska
Browse files

Cleanup for RPC errors


Curl error messages are self contained and don't need "error" prefix;
added RpcResult Error which will be used once proper deserialization
of rpc response is in place.

Signed-off-by: default avatarAgata Murawska <agatamurawska@google.com>
Reviewed-by: default avatarIustin Pop <iustin@google.com>
parent f9b0084a
No related merge requests found
......@@ -89,6 +89,7 @@ data RpcError
= CurlDisabledError
| CurlLayerError Node String
| JsonDecodeError String
| RpcResultError String
| OfflineNodeError Node
deriving Eq
......@@ -96,9 +97,11 @@ instance Show RpcError where
show CurlDisabledError =
"RPC/curl backend disabled at compile time"
show (CurlLayerError node code) =
"Curl error for " ++ nodeName node ++ ", error " ++ code
"Curl error for " ++ nodeName node ++ ", " ++ code
show (JsonDecodeError msg) =
"Error while decoding JSON from HTTP response " ++ msg
"Error while decoding JSON from HTTP response: " ++ msg
show (RpcResultError msg) =
"Error reponse received from RPC server: " ++ msg
show (OfflineNodeError node) =
"Node " ++ nodeName node ++ " is marked as offline"
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment