Skip to content

Commit

Permalink
Update error type in EmailServerIntegrationService to reflect incorre…
Browse files Browse the repository at this point in the history
…ct email configuration
  • Loading branch information
raikbitters committed Oct 31, 2024
1 parent dad7bb3 commit 87a8a33
Showing 1 changed file with 2 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
package com.epam.ta.reportportal.core.integration.util;

import static com.epam.reportportal.rules.commons.validation.BusinessRule.fail;
import static com.epam.reportportal.rules.exception.ErrorType.FORBIDDEN_OPERATION;
import static com.epam.reportportal.rules.exception.ErrorType.EMAIL_CONFIGURATION_IS_INCORRECT;
import static java.util.Optional.ofNullable;

import com.epam.reportportal.rules.commons.validation.BusinessRule;
Expand All @@ -31,7 +31,6 @@
import com.epam.ta.reportportal.util.email.MailServiceFactory;
import com.google.common.collect.Maps;
import com.mchange.lang.IntegerUtils;
import java.io.UnsupportedEncodingException;
import java.util.Map;
import java.util.Optional;
import javax.mail.MessagingException;
Expand Down Expand Up @@ -178,7 +177,7 @@ public boolean checkConnection(Integration integration) {
LOGGER.error("Cannot send email to user", ex);
fail()
.withError(
FORBIDDEN_OPERATION,
EMAIL_CONFIGURATION_IS_INCORRECT,
"Email configuration is incorrect. Please, check your configuration. "
+ ex.getMessage());
}
Expand Down

0 comments on commit 87a8a33

Please sign in to comment.