in hq/app/notifications/AnghammaradNotifications.scala [18:36]
def send(
notification: Notification,
topicArn: String,
snsClient: SnsAsyncClient,
)(implicit executionContext: ExecutionContext): Attempt[String] = {
Attempt.fromFuture(Anghammarad.notify(notification, topicArn, snsClient)) { case NonFatal(e) =>
Failure(
s"Failed to send Anghammarad notification ${e.getMessage}",
"Unable to send developer notification",
500,
throwable = Some(e)
).attempt
}.tap {
case Left(failure) =>
logger.error(failure.logMessage, failure.firstException.orNull)
case Right(id) =>
logger.info(s"Sent notification to ${notification.target}: $id")
}
}