From 70c2362ec2cd59269eb3edabb0d82da8aef592d3 Mon Sep 17 00:00:00 2001
From: Agata Murawska <agatamurawska@google.com>
Date: Thu, 27 Sep 2012 17:19:35 +0200
Subject: [PATCH] Pretty printing JSValue

Signed-off-by: Agata Murawska <agatamurawska@google.com>
Reviewed-by: Iustin Pop <iustin@google.com>
---
 htools/Ganeti/Rpc.hs | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/htools/Ganeti/Rpc.hs b/htools/Ganeti/Rpc.hs
index 625c7b67f..0772c8f76 100644
--- a/htools/Ganeti/Rpc.hs
+++ b/htools/Ganeti/Rpc.hs
@@ -280,7 +280,7 @@ instance Rpc RpcCallInstanceInfo RpcResultInstanceInfo where
           [] -> Right $ RpcResultInstanceInfo Nothing
           _ -> fromJSValueToRes res (RpcResultInstanceInfo . Just)
       _ -> Left $ JsonDecodeError
-           ("Expected JSObject, got " ++ show res)
+           ("Expected JSObject, got " ++ show (pp_value res))
 
 -- | AllInstancesInfo
 --   Returns information about all running instances on the given nodes
@@ -307,7 +307,7 @@ instance Rpc RpcCallAllInstancesInfo RpcResultAllInstancesInfo where
           Left err -> Left err
           Right insts -> Right $ RpcResultAllInstancesInfo insts
       _ -> Left $ JsonDecodeError
-           ("Expected JSObject, got " ++ show res)
+           ("Expected JSObject, got " ++ show (pp_value res))
 
 -- | InstanceList
 -- Returns the list of running instances on the given nodes.
-- 
GitLab