From 5c459a3a1663a5b29656256dc3474ba0d0f8e7a1 Mon Sep 17 00:00:00 2001 From: LSmyrnaios Date: Thu, 31 Aug 2023 13:20:12 +0300 Subject: [PATCH] Optimize handling of HTTP-4XX errors in "UrlsServiceImpl.postReportResultToWorker()". --- .../eu/openaire/urls_controller/services/UrlsServiceImpl.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/main/java/eu/openaire/urls_controller/services/UrlsServiceImpl.java b/src/main/java/eu/openaire/urls_controller/services/UrlsServiceImpl.java index bcb54b3..989be1e 100644 --- a/src/main/java/eu/openaire/urls_controller/services/UrlsServiceImpl.java +++ b/src/main/java/eu/openaire/urls_controller/services/UrlsServiceImpl.java @@ -543,6 +543,9 @@ public class UrlsServiceImpl implements UrlsService { } catch (HttpServerErrorException hsee) { logger.error("The Worker \"" + workerId + "\" failed to handle the \"postReportResultToWorker\", of assignments_" + assignmentRequestCounter + ": " + hsee.getMessage()); return false; + } catch (HttpClientErrorException hcee) { + logger.error("The Controller did something wrong when sending the report result to the Worker (" + workerId + "). | url: " + url + "\n" + hcee.getMessage()); + return false; } catch (Exception e) { errorMsg = "Error for \"postReportResultToWorker\", of assignments_" + assignmentRequestCounter + " to the Worker: " + workerId; Throwable cause = e.getCause();