- Left jerr -> Left $ "Unparseable response: " ++ (show (responseBody rsp))
- Right jrsp ->
- case resValue jrsp of
- "" -> Right emptyNmcDom
- vstr ->
- case decode vstr :: Maybe NmcDom of
- Nothing -> Left $ "Unparseable value: " ++ (show vstr)
- Just dom -> Right dom
+ Left jerr ->
+ case (jrpcErrCode jerr) of
+ -4 -> Right ""
+ _ -> Left $ "JsonRpc error response: " ++ (show jerr)
+ Right jrsp -> Right $ resValue jrsp