From 745fa2f652b2199d218836195cfe9c973766a3e9 Mon Sep 17 00:00:00 2001 From: Marten Hogeweg Date: Mon, 30 Oct 2023 16:36:45 -0700 Subject: [PATCH] updated messages include successful delete and unsuccessful delete message. --- .../java/com/esri/geoportal/harvester/gpt/GptBroker.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/geoportal-connectors/geoportal-harvester-gpt/src/main/java/com/esri/geoportal/harvester/gpt/GptBroker.java b/geoportal-connectors/geoportal-harvester-gpt/src/main/java/com/esri/geoportal/harvester/gpt/GptBroker.java index ee0ce71f..c2bd8191 100644 --- a/geoportal-connectors/geoportal-harvester-gpt/src/main/java/com/esri/geoportal/harvester/gpt/GptBroker.java +++ b/geoportal-connectors/geoportal-harvester-gpt/src/main/java/com/esri/geoportal/harvester/gpt/GptBroker.java @@ -127,8 +127,12 @@ public void terminate() { for (String id : existing) { PublishResponse deleteResult = client.delete(id); if ((deleteResult != null) && (deleteResult.getStatus() != null)) { + LOG.info(String.format("Metadata deleted: %1$s", id)); deleted += 1; - } + } else { + String responseMessage = deleteResult != null ? deleteResult.getError().toString() : "None"; + LOG.error(String.format("Error deleting metadata: %1$s: response: %2$s", id, responseMessage)); + } } LOG.info(String.format("%d records has been removed during cleanup.", deleted)); }