robertjdominguez / ez-resy

Quickly and easily snipe reservations with just a bit of configuration.
13 stars 7 forks source link

Add explicit messaging if there are no venue results #2

Closed jannemecek closed 3 months ago

jannemecek commented 3 months ago

Whenever I ran the script after setting up, I would get the following error


TypeError: Cannot read properties of undefined (reading 'venue')
    at fetchDataAndParseSlots (file:///Users/jan/Developer/ez-resy/utils/bookingLogic.js:29:71)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
    at async file:///Users/jan/Developer/ez-resy/index.js:15:17

This lead me to believe that my venue ID was somehow wrong but it simply meant there was no possibility to book for the given slot config (which made sense since the reservations were yet to open). I added clear messaging so the user is not confused that the script failed.