def fromCookie()

in app/logic/Favourites.scala [12:33]


  def fromCookie(cookie: Cookie): List[String] = {
    try {
      Json
        .parse(Base64.getDecoder.decode(cookie.value))
        .validate[List[String]]
        .fold(
          { a =>
            logger.warn("Could not parse favourites cookie")
            Nil
          },
          identity
        )
    } catch {
      case e @ (_: JsonMappingException | _: JsonParseException |
          _: IllegalArgumentException) =>
        logger.warn(
          s"Failed to parse favourites cookie value: ${cookie.value}",
          e
        )
        Nil
    }
  }