forked from M-Labs/artiq
influxdb: better error reporting
This commit is contained in:
parent
ed0a7632d9
commit
2275017651
|
@ -91,8 +91,12 @@ class DBWriter(TaskObject):
|
||||||
k, exc_info=True)
|
k, exc_info=True)
|
||||||
else:
|
else:
|
||||||
if response.status not in (200, 204):
|
if response.status not in (200, 204):
|
||||||
logger.warning("got HTTP status %d trying to update '%s'",
|
content = (yield from response.content.read()).decode()
|
||||||
response.status, k)
|
if content:
|
||||||
|
content = content[:-1] # drop \n
|
||||||
|
logger.warning("got HTTP status %d "
|
||||||
|
"trying to update '%s': %s",
|
||||||
|
response.status, k, content)
|
||||||
response.close()
|
response.close()
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue