From: Eugene Crosser Date: Sat, 12 Apr 2014 20:33:39 +0000 (+0400) Subject: report 'not found' as emtpy X-Git-Tag: 0.9.0.0~87 X-Git-Url: http://average.org/gitweb/?a=commitdiff_plain;h=13af223171039fef454aa6a5be8e96ffb92f7628;p=pdns-pipe-nmc.git report 'not found' as emtpy --- diff --git a/pdns-pipe-nmc.hs b/pdns-pipe-nmc.hs index 3b5ddf6..ed5d47c 100644 --- a/pdns-pipe-nmc.hs +++ b/pdns-pipe-nmc.hs @@ -45,7 +45,7 @@ qRsp rsp = case parseJsonRpc (responseBody rsp) :: Either JsonRpcError NmcRes of Left jerr -> case (jrpcErrCode jerr) of - -4 -> Right "" + -4 -> Right "{}" -- this is how non-existent entry is returned _ -> Left $ "JsonRpc error response: " ++ (show jerr) Right jrsp -> Right $ resValue jrsp