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)
|
||||
else:
|
||||
if response.status not in (200, 204):
|
||||
logger.warning("got HTTP status %d trying to update '%s'",
|
||||
response.status, k)
|
||||
content = (yield from response.content.read()).decode()
|
||||
if content:
|
||||
content = content[:-1] # drop \n
|
||||
logger.warning("got HTTP status %d "
|
||||
"trying to update '%s': %s",
|
||||
response.status, k, content)
|
||||
response.close()
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue