Optimize handling of HTTP-4XX errors in "UrlsServiceImpl.postReportResultToWorker()".

This commit is contained in:
Lampros Smyrnaios 2023-08-31 13:20:12 +03:00
parent 601776e81c
commit 5c459a3a16
1 changed files with 3 additions and 0 deletions

View File

@ -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();