in notificationworkerlambda/src/main/scala/com/gu/notifications/worker/utils/Reporting.scala [16:21]
private def logMatchCase(response: Either[DeliveryException, DeliverySuccess], prefix: String)(implicit logger: Logger): Unit = response match {
case Left(e: InvalidToken) => logger.warn(s"$prefix $e")
case Left(e: FailedRequest) => logger.warn(s"$prefix $e", e.cause)
case Left(e) => logger.error(prefix, e)
case Right(_) => () // doing nothing when success
}