robertjdominguez/ez-resy

504 Error

Closed this issue · 3 comments

Hi,
I scheduled this booking via cron and tested everything out to make sure my .env is working properly. The program was able to find a table available but was not able to book the table. I'm not sure if this is related to this restaurant or if there's something wrong with my setup.

resy@1.0.0 start:today
dotenv -e .env node index.js

JWT will expire on Sat Nov 30 2024 09:10:46 GMT-0500 (Eastern Standard Time)
Checking for reservations at XXX on Saturday, November 16 for 2 people...
There are 23 slots available
Booking a prime slot at 5:30 PM!

<TITLE>ERROR: The request could not be satisfied</TITLE>

504 ERROR

The request could not be satisfied.


CloudFront attempted to establish a connection with the origin, but either the attempt failed or the origin closed the connection. We can't connect to the server for this app or website at this time. There might be too much traffic or a configuration error. Try again later, or contact the app or website owner.
If you provide content to customers through CloudFront, you can find steps to troubleshoot and help prevent this error by reviewing the CloudFront documentation.

Generated by cloudfront (CloudFront)
Request ID: pUjX23UXoR2YIQwLVMwtS26mYXGUR3i9WrdoS_gorPwdx5tHVyFavA==
file:///Users/XXX/ez-resy/index.js:20 if (booking.resy_token) { ^

TypeError: Cannot read properties of undefined (reading 'resy_token')
at file:///Users/XXXez-resy/index.js:20:19
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)

Node.js v20.15.0

@edlsy1226 if you unpack the error:

TypeError: Cannot read properties of undefined (reading 'resy_token')

The application is letting you know it can't resolve resy_token at this point in your application. You should ensure your AUTH_TOKEN and PAYMENT_ID values are accurate and then try again.

thanks for getting back to me. I can confirm that my auth_token and payment_id are both working properly. I tested them after today's failed cron job by running the code manually with a different restaurant that requires repayment. I'll try again tomorrow morning running it manually.

Closing due to lack of activity.