mirror of
https://github.com/VictoriaMetrics/VictoriaMetrics.git
synced 2026-08-24 20:27:48 +03:00
Fixes https://github.com/VictoriaMetrics/VictoriaMetrics/issues/11330 Align with https://prometheus.io/docs/prometheus/latest/querying/api/#format-overview, return `400` instead of `422` when request parameters are missing or incorrect and should be fixed on the caller side. One exception is when the request hits a [resource limit](https://docs.victoriametrics.com/victoriametrics/cluster-victoriametrics/#resource-usage-limits), such as `search.maxPointsPerTimeseries`; it could be fixed by the caller(reducing the request range) or the admin(increasing the limit), but it is not caused by incorrect parameters, so in this case, still return 422. --------- Co-authored-by: Max Kotliar <mkotlyar@victoriametrics.com>