mirror of
https://github.com/moparisthebest/SickRage
synced 2024-12-13 11:32:20 -05:00
Added error logging for webserver gets and posts
This commit is contained in:
parent
327df6682e
commit
c09ceb5e6c
@ -210,15 +210,23 @@ class IndexHandler(RedirectHandler):
|
||||
@asynchronous
|
||||
@gen.coroutine
|
||||
def get(self, *args, **kwargs):
|
||||
resp = yield self.get_response()
|
||||
self.finish(resp)
|
||||
try:
|
||||
resp = yield self.get_response()
|
||||
self.finish(resp)
|
||||
except Exception as e:
|
||||
logger.log(e, logger.ERROR)
|
||||
self.finish()
|
||||
|
||||
@gen.coroutine
|
||||
def get_response(self):
|
||||
raise gen.Return(self._dispatch())
|
||||
|
||||
def post(self, *args, **kwargs):
|
||||
self.finish(self._dispatch())
|
||||
try:
|
||||
self.finish(self._dispatch())
|
||||
except Exception as e:
|
||||
logger.log(e, logger.ERROR)
|
||||
self.finish()
|
||||
|
||||
def robots_txt(self, *args, **kwargs):
|
||||
""" Keep web crawlers out """
|
||||
|
Loading…
Reference in New Issue
Block a user