mirror of
https://github.com/SickGear/SickGear.git
synced 2025-01-05 17:43:37 +00:00
Added error logging for webserver gets and posts
This commit is contained in:
parent
327df6682e
commit
c09ceb5e6c
1 changed files with 11 additions and 3 deletions
|
@ -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 a new issue