Alkaar / resy-booking-bot

🔫 Helps to snipe hard to get reservations at restaurants that use resy
408 stars 215 forks source link

getting error when attempting to snipe #88

Open yarneo opened 1 year ago

yarneo commented 1 year ago

[INFO ] 2023-02-20 08:59:58.031-05:00 ResyBookingWorkflow:20 - Attempting to snipe reservation sbt:resy-booking-bot> java.util.NoSuchElementException: head of empty list at scala.collection.immutable.Nil$.head(List.scala:662) at scala.collection.immutable.Nil$.head(List.scala:661) at com.resy.ResyClient.findReservationTime(ResyClient.scala:188) at com.resy.ResyClient.retryFindReservations(ResyClient.scala:172) at com.resy.ResyClient.findReservations(ResyClient.scala:50) at com.resy.ResyBookingWorkflow.runnable(ResyBookingWorkflow.scala:22) at com.resy.ResyBookingWorkflow.run(ResyBookingWorkflow.scala:14) at com.resy.ResyBookingBot$.$anonfun$main$4(ResyBookingBot.scala:51) at akka.actor.Scheduler$$anon$7.run(Scheduler.scala:479) at java.base/java.util.concurrent.ForkJoinTask$RunnableExecuteAction.exec(ForkJoinTask.java:1423) at java.base/java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:387) at java.base/java.util.concurrent.ForkJoinPool$WorkQueue.topLevelExec(ForkJoinPool.java:1311) at java.base/java.util.concurrent.ForkJoinPool.scan(ForkJoinPool.java:1840) at java.base/java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1806) at java.base/java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:177)

I did in my config: resDetails.res-time-types=[] because it's impossible for me to know what are the types of seating they offer to say "6:30 Outside table" etc. Not sure if that's causing the issue

Alkaar commented 1 year ago

Yea you can't pass an empty list. I suppose I could add a guard here but it's a bit unusual to intentionally pass nothing. If you want to see what reservations are available, you should update the log4j2.properties file values from info to debug. It's a bit verbose but just search the output and you can find it.