I'm a little confused on error handling in TG versus CherryPy itself. The CP site has a few examples of how to ensure that a 404 response is sent for a page that does not exist, but it looks like it would conflict with the use of Kid templates to generate a 'custom' 404 page.

Currently, I have a 'default' defined for my Root class; if someone requests a page that does not exist, it falls through to this method and it then uses my 404.kid template to generate a custom not-found page.

That's cool so far, but shouldn't a 404 error be sent in the response? When using the 'default' method, I'm sending a '200' response (page found), which is not very useful to crawlers, etc.

What's the best way to handle this? Dispose of default() and use the CP error handler instead?

--
"Things fall apart. The Center cannot hold."
                  - Life as a QA geek, in a nutshell.

Best,

    Jeff

Reply via email to