Open bubaflub opened 8 years ago
This would be very useful, getting the same response w/ a Java client and I have no idea why!
@brian-brazil , I'd like to know if this issue is still valid, since for the above code pushing malformed data, I get this error instead, which seems to be correct:
File "issue_96.py", line 6, in <module>
c2 = prometheus_client.Counter("foo", "bar", labelnames=["baz", "stuff"], registry=reg)
File "/home/subha/Documents/GitHub/venv/lib/python3.6/site-packages/prometheus_client-0.8.0-py3.6.egg/prometheus_client/metrics.py", line 121, in __init__
File "/home/subha/Documents/GitHub/venv/lib/python3.6/site-packages/prometheus_client-0.8.0-py3.6.egg/prometheus_client/registry.py", line 31, in register
ValueError: Duplicated timeseries in CollectorRegistry: {'foo_total', 'foo_created'}
Even if a different error is showing up for the same case, I'd say it's still better to get the exception handled altogether so that we can account for similar cases that result in a 500 server error.
I accidentally sent malformed data to a push gateway and got back a 500 Internal Server Error. The body of the response had information about the malformed data but all that was printed was the fact that I got a 500 Internal Server Error.
Example code:
Output: