private def delete()

in src/main/scala/managehelpcontentpublisher/S3.scala [61:74]


  private def delete(key: String): Either[Failure, String] = {
    val fullPath = s"s3://${config.aws.bucketName}/$key"
    Try(
      client.deleteObject(
        DeleteObjectRequest
          .builder()
          .bucket(config.aws.bucketName)
          .key(key)
          .build()
      )
    ).toEither
      .left.map(e => ResponseFailure(s"Failed to delete $fullPath: ${e.getMessage}"))
      .map(_ => fullPath)
  }