]> average.org Git - pdns-pipe-nmc.git/commitdiff
report 'not found' as emtpy
authorEugene Crosser <crosser@average.org>
Sat, 12 Apr 2014 20:33:39 +0000 (00:33 +0400)
committerEugene Crosser <crosser@average.org>
Sat, 12 Apr 2014 20:33:39 +0000 (00:33 +0400)
pdns-pipe-nmc.hs

index 3b5ddf671dff351b6d3f9643ccaccf73614640ea..ed5d47c4a929723e42dbd57716c2c1fe4e9db169 100644 (file)
@@ -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