Hi,
self.error(500) just sets the status code and clears the response, it
doesn't render any message in the browser. From
http://code.google.com/p/googleappengine/source/browse/trunk/google/appengine/ext/webapp/__init__.py:
def error(self, code):
"""Clears the response output stream and sets the given HTTP error code.
Args:
code: the HTTP status error code (e.g., 501)
"""
self.response.set_status(code)
self.response.clear()
-Marzia
On Sun, Feb 8, 2009 at 7:26 PM, joshuacronemeyer
<[email protected]> wrote:
>
> When my server responds with an error I can see it in the server log,
> but in my browser the response is just a blank page instead of the
> error I sent.
>
> Here is my code:
>
> from google.appengine.ext import webapp
> from google.appengine.ext.webapp.util import run_wsgi_app
>
> class Hello(webapp.RequestHandler):
> def get(self):
> self.error(500)
>
> def main():
> run_wsgi_app(application)
>
> application = webapp.WSGIApplication([('/', Hello)],debug=True)
>
> if __name__ == "__main__":
> main()
>
> When I hit the page the log shows:
> INFO 2009-02-09 02:47:35,082 dev_appserver.py] "GET / HTTP/1.1"
> 500 -
>
> But the page is just a blank page
>
> >
>
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Google App Engine" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/google-appengine?hl=en
-~----------~----~----~----~------~----~------~--~---