module Network.IPFS.Client.Error.Types (ErrorBody (..)) where import Network.IPFS.Prelude data ErrorBody = ErrorBody {ErrorBody -> String message :: String} instance FromJSON ErrorBody where parseJSON :: Value -> Parser ErrorBody parseJSON = forall a. String -> (Object -> Parser a) -> Value -> Parser a withObject String "ErrorBody" \Object obj -> do String message <- Object obj forall a. FromJSON a => Object -> Key -> Parser a .: Key "Message" return ErrorBody {String message :: String $sel:message:ErrorBody :: String ..}