mirror of
https://github.com/Tautulli/Tautulli.git
synced 2025-08-22 06:13:25 -07:00
If we fail to parse a response, log the uri.
This commit is contained in:
parent
f7bc208fd1
commit
0e4c76275d
1 changed files with 18 additions and 13 deletions
|
@ -88,6 +88,7 @@ class HTTPHandler(object):
|
|||
return None
|
||||
|
||||
if request_status == 200:
|
||||
try:
|
||||
if output_format == 'dict':
|
||||
output = helpers.convert_xml_to_dict(request_content)
|
||||
elif output_format == 'json':
|
||||
|
@ -101,6 +102,10 @@ class HTTPHandler(object):
|
|||
return output, content_type
|
||||
|
||||
return output
|
||||
|
||||
except Exception as e:
|
||||
logger.warn(u"Failed to parse %s to %s %s" % (uri, output_type, e))
|
||||
return None
|
||||
else:
|
||||
logger.warn(u"Failed to access uri endpoint %s. Status code %r" % (uri, request_status))
|
||||
return None
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue