Note that there are some explanatory texts on larger screens.

plurals
  1. POdesign for handling exceptions - google app engine
    primarykey
    data
    text
    <p>I'm developing a project on google app engine (webapp framework). I need you people to assess how I handle exceptions.</p> <p>There are 4 types of exceptions I am handling:</p> <ol> <li>Programming exceptions</li> <li>Bad user input</li> <li>Incorrect URLs</li> <li>Incorrect query strings</li> </ol> <p>Here is how I handle them:</p> <ol> <li><p>I have subclassed the webapp.requesthandler class and overrode the handle_exceptions method. Whenever an exception occurs, I take the user to a friendly "we're sorry" page and in the meantime send a message with the traceback to the admins. </p></li> <li><p>On the client side I (will) use js and also validate on the server side. Here I figure (as a coder with non-web experience) in addition to validate inputs according to programming logic (check: cash input is of the float type?) and business rules (check: user has enough points to take that action?), I also have to check against malicious intentions. What measures should I take against malicious actions?</p></li> <li><p>I have a catch-all URL that handles incorrect URLs. That is to say, I take the user to a custom "page does not exist" page. Here I have no problems, I think.</p></li> <li><p>Incorrect query strings presumably raise exceptions if left to themselves. If an ID does not exist, the method returns None (an exception is on the way). if the parameter is inconvenient, the code raises an exception. Here I think I must raise a 404 and take the user to the custom "page does not exist" page. What should I do?</p></li> </ol> <p>What are your opinions? Thanks in advance..</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload