src/main/scala/s3/website/CloudFront.scala in s3_website-2.1.12 vs src/main/scala/s3/website/CloudFront.scala in s3_website-2.1.13
- old
+ new
@@ -1,7 +1,8 @@
package s3.website
+import s3.website.ErrorReport._
import s3.website.model.{FileUpdate, Config}
import com.amazonaws.services.cloudfront.{AmazonCloudFrontClient, AmazonCloudFront}
import com.amazonaws.services.cloudfront.model.{TooManyInvalidationsInProgressException, Paths, InvalidationBatch, CreateInvalidationRequest}
import scala.collection.JavaConversions._
import scala.concurrent.duration._
@@ -58,11 +59,11 @@
case class SuccessfulInvalidation(invalidatedItemsCount: Int)(implicit pushMode: PushMode) extends SuccessReport {
def reportMessage = s"${Invalidated.renderVerb} ${invalidatedItemsCount ofType "item"} on CloudFront"
}
- case class FailedInvalidation(error: Throwable) extends FailureReport {
- def reportMessage = s"Failed to invalidate the CloudFront distribution (${error.getMessage})"
+ case class FailedInvalidation(error: Throwable)(implicit logger: Logger) extends ErrorReport {
+ def reportMessage = errorMessage(s"Failed to invalidate the CloudFront distribution", error)
}
def awsCloudFrontClient(config: Config) = new AmazonCloudFrontClient(awsCredentials(config))
def toInvalidationBatches(pushSuccessReports: Seq[PushSuccessReport])(implicit config: Config): Seq[InvalidationBatch] = {