private[iam] def tryParsingReport()

in hq/app/aws/iam/CredentialsReport.scala [42:52]


  private[iam] def tryParsingReport(content: String) = {
    Try {
      parseCredentialsReport(content)
    } match {
      case Success(x)  if x.nonEmpty => Attempt.Right(x)
      case Success(_) =>
        Attempt.Left(utils.attempt.Failure(s"CREDENTIALS_PARSE_ERROR", "Credentials report is empty", 500))
      case Failure(th) =>
        Attempt.Left(utils.attempt.Failure(s"CREDENTIALS_PARSE_ERROR: ${th.getMessage}", "Cannot parse AWS credentials audit report", 500))
    }
  }