updated messages in exceptions thrown when feedback recipient is disabled and when mandatory fields are missing

This commit is contained in:
Corrado Lombardi
2022-01-12 13:09:29 +01:00
parent 189d9a60b9
commit a6a74463b0

View File

@@ -62,7 +62,8 @@ public class FeedbackRestRepository extends DSpaceRestRepository<FeedbackRest, I
String recipientEmail = configurationService.getProperty("feedback.recipient");
if (StringUtils.isBlank(recipientEmail)) {
throw new DSpaceFeedbackNotFoundException("Recipient's email was not found!");
throw new DSpaceFeedbackNotFoundException("Feedback cannot be sent at this time, Feedback recipient " +
"is disabled");
}
try {
@@ -75,7 +76,7 @@ public class FeedbackRestRepository extends DSpaceRestRepository<FeedbackRest, I
String message = feedbackRest.getMessage();
if (StringUtils.isBlank(senderEmail) || StringUtils.isBlank(message)) {
throw new DSpaceBadRequestException("Filds as e-mail and message are mandatory!");
throw new DSpaceBadRequestException("e-mail and message fields are mandatory!");
}
try {