loki returns 500 code for parse error in labels #929
Labels
component/loki
good first issue
These are great first issues. If you are looking for a place to start, start here!
help wanted
We would love help on these issues. Please come help us!
type/bug
Somehing is not working as expected
Describe the bug
If you provide a POST to
/api/prom/push
where the "labels" member is unparseable, loki rejects it with a 500 error. IMO it should be 400.500 implies that (a) the fault is at the server side, not with the client-provided data; and (b) that it may work if the client resends the same request later, which clearly it won't in this case.
(Extracted from #927)
To Reproduce
Steps to reproduce the behavior:
Expected behavior
A 400 "Bad Request" error code (which is the behaviour if the request is invalid for other reasons, e.g. you submit a log timestamp that is too far in the past)
Environment:
Screenshots, promtail config, or terminal output
Trimmed request:
A more complete request which showed this:
The text was updated successfully, but these errors were encountered: