FACG5 / OAK-Movie-blog

https://movie-blog0.herokuapp.com/
0 stars 2 forks source link

Note on error pages #23

Open NouraldinS opened 6 years ago

NouraldinS commented 6 years ago

So what you did is perfectly correct and functional, and if you're hurt by the I-think-there's-a-better-way-of-doing-this comments then don't continue reading. So what you made (Which is perfectly functional) is: You'd sent for each error different parameters, like the stylefile (which is a very good way of assigning styles) and your errorMessage. Which is perfectly functional, although, is this the place to put your image source? I believe if you hadn't added your img attribute in your error object it would be better, for the following reason; Imagine I've more data that separates 404 from 500, will I put everything in that object? Does it sound correct? If it does then it's perfectly fine\functional. But if it doesn't, then I would suggest that you make two separate error pages (or at least two conditions in the same error page if statusCode === 404 do404Stuff(); else do500Stuff();.

kannanhassouna commented 6 years ago

i got it , thanks @NoureldeanSaed