in ses-plugin-server/src/main/kotlin/jetbrains/buildServer/sesPlugin/sqs/ComplaintMessageHandler.kt [17:40]
override fun handle(data: SESNotification) {
if (data !is SESComplaintNotification) throw IllegalArgumentException()
val mails = data.getComplainedRecipients().asSequence().map {
logService.log {
if (logger.isDebugEnabled) {
logger.debug("Got complaint for email '${it.emailAddress}': $data")
} else {
logger.info("Got complaint for email '${it.emailAddress}'")
}
}
it.emailAddress
}
try {
bounceHandler.handleBounces(mails)
} catch (e: Exception) {
logService.log {
logger.warnAndDebugDetails("Exception occurred while handling bounce '$data' with '$bounceHandler'", e)
}
}
}