504-gateway time-out


#1

Hi,
I am working on the freecode camp TIMESTAMP MICROSERVICE PROJECT for the backend certification. I get the correct response on time when I input a unixtime. But when I input a natural Date like, Dec 24, 1985, I get the504-GATEWAY TIME-OUT. I think there is something wrong with my code… My web address is:https://encouraging-jay.glitch.me/. It was working fine yesterday. I might have made some changes which cause the error. But, in spite of my efforts, I could not fix it. I hope somebody can help me.
Ahammadunny Pathiaseril
Ahammadunny@hotmail.com


#2

Hi @ahammadunny,

the problem is in server2.js, line 37. You’ve to move that line out of the else block. Alternatively, you can keep that line there and put the same line at the end of the if block. You get a 504 timeout because your server is not responding.

We should probably provide a better error message :smiley: Thanks for reporting!


#3

Hello sir,
Thank you for the reply. Line 34 in server2.js is commented out with(//)… May be, it is not that way on glitch.com. Any how, I will do what you suggested to me to do.
Ahammadunny Pathiaseril
Ahammadunny@hotmail.com


#4

Hello sir,
I misread the line number. You said line 37. I read it as 34. Sorry for it. I corrected the mistake. Now, it works. Thank you
Ahammadunny Pathiaseril
ahammadunny@hotmail.com