404 error page response status is 200

Hi all,

Hoping someone could point me in the right direction. I've been following the latest instructions I could find about creating a 404 page here: Creating Custom Error Pages in NodeJS

The page works fine. But the response returns the status code 200, not 404? Maybe I'm missing some setting here, but we need it to return the correct 404 code.

While I'm no expert on express, I have been digging through the routes.js and server.js files and there seems to be no status set for those routes. Adding this line (highlighted in screenshot below) to the server.js file fixes the problem and returns the correct status code. Not even sure if this is valid code but it works.

Obviously this would be really annoying to have to change every time wappler pushes an update. Any thoughts?

2 Likes

Bump - if anyone has any thoughts please that would be appreciated :slight_smile:

This is called a bug report :stuck_out_tongue:

I've moved your topic to the bug report section so Patrick can apply this fix permanently. Good detective work!

2 Likes

Awesome thanks @Apple. Wasn’t sure if I had missed something earlier.

Fixed in Wappler 7 beta 15