more detailed error message (#14385)

pull/14393/head
Malte Franken 2018-05-11 20:28:28 +10:00 committed by Fabian Affolter
parent 528ad56530
commit 48d70e520f
1 changed files with 3 additions and 2 deletions

View File

@ -176,6 +176,7 @@ class RestData(object):
self._request, timeout=10, verify=self._verify_ssl)
self.data = response.text
except requests.exceptions.RequestException:
_LOGGER.error("Error fetching data: %s", self._request)
except requests.exceptions.RequestException as ex:
_LOGGER.error("Error fetching data: %s from %s failed with %s",
self._request, self._request.url, ex)
self.data = None