AMU-Code-Squad/food-up

Make an error handling page for unsual requests

Closed this issue · 3 comments

Can be a 404.ejs template which can be later on placed as error handler if an unusual request is made.

can i work on this ?? if yes ,can i just add a 404.ejs in the views directory and place if/else or try/catch part in every routing case for error. Would this work or do u have any suggestions??

Yes, I guess try/catch will work here. You can add a 404 page with that. You are welcome to contribute to any of the issue.

i have tried
1).error handling functions,
2).router.get('*', function(req, res){
res.status(404).send('what???'); // just to see output
});
and 3).if /else error part,
then "view all food posts" and "login" was rendering error .ejs.
may be earlier, even when error was happening code directed routes perfectly and code seems to work fine and now it 's creating problem after error handling.
please suggest me something, i don't know what to do next.
for now i can try contribute to other parts of the projects .