private def getSnapshot()

in app/controllers/Export.scala [81:92]


  private def getSnapshot(stack: FlexibleStack, id: SnapshotId): FormattedSnapshot = {
    Await.result(snapshotApi.getRawSnapshot(stack.snapshotBucket, id).asFuture(controllerComponents.executionContext), timeout) match {
      case Left(err) =>
        throw new IllegalStateException(err.toString)

      case Right(None) =>
        throw new IllegalStateException(s"Missing snapshot for $stack $id")

      case Right(Some(snapshot)) =>
        FormattedSnapshot(snapshot)
    }
  }