codemonument / deno_audio_logbook

A deno fresh server, with a telegram bot to receive audio messages and a website to show all messages of a user in a calendar
2 stars 0 forks source link

HTTP 502 - Bad Gateway #18

Closed bjesuiter closed 1 year ago

bjesuiter commented 1 year ago

Message in Deno Discord:

Hey Guys, I have a Problem with deno deploy.

First, my deployment works flawless, but after some time it randomly stops working with a 502 Bad Gateway Error. I do not see anything in the Log, so I assume no TS Error happened.

=> Do you know what might have happened and even more important: How might I fix this???

image image

bjesuiter commented 1 year ago

Solution:

We had a _midleware.ts which checked for the availability of a cookie with an if-statement. However when no cookie was available, our server did not return any response. This was not obvious, bc. it was a pretty long if-body and no else handling below.

=> Maybe deno deploy should log an error for routes not returning a http response, instead of logging nothing?

=> Or please add a section with a troubleshooting guide on "I get a 502 error, what to do?" to the Docs!