Its unclear how to do do this
a: change line server.py Simple.render line 98 to pass the request to every function
b: somehow know in the return from each function that its an error,
c: have the function throw an exception and wrap line 98 to catch that. (In Javascript I throw an Error Class with a status and message field, but I’m not sure what the pythonic/twisted way to do this is
For now, I'm assuming that a string return is an error - detecting that in Simple.render line 98 and then doing the request.setResponseCode(302) thing that Dan suggested.
This seems the WRONG way to do it, so I've flagged everywhere I've done this with TODO-72 and can quickly change it to any of a,b or c once I get clarity (from Dan).
Its unclear how to do do this a: change line server.py Simple.render line 98 to pass the request to every function b: somehow know in the return from each function that its an error, c: have the function throw an exception and wrap line 98 to catch that. (In Javascript I throw an Error Class with a status and message field, but I’m not sure what the pythonic/twisted way to do this is
For now, I'm assuming that a string return is an error - detecting that in Simple.render line 98 and then doing the request.setResponseCode(302) thing that Dan suggested.
This seems the WRONG way to do it, so I've flagged everywhere I've done this with TODO-72 and can quickly change it to any of a,b or c once I get clarity (from Dan).