def dataToResult[T]()

in app/services/PrismData.scala [29:44]


  def dataToResult[T](data: CacheData[T], now: DateTime)(implicit
      exec: ExecutionContext
  ): T = data match {
    case Left(NotInitialised) =>
      throw new IllegalStateException(
        s"AMIgo internal data cache is not yet populated"
      )
    case Left(_) =>
      throw new IllegalStateException(s"CacheData failed for unknown reason")
    case Right((_, staleTimeStamp))
        if (now.getMillis - staleTimeStamp.getMillis) > MAX_AGE =>
      throw new IllegalStateException(
        s"AMIgo internal data cache is stale - last update at $staleTimeStamp"
      )
    case Right((t, _)) => t
  }