mirror of
https://github.com/VictoriaMetrics/VictoriaMetrics.git
synced 2024-11-21 14:44:00 +00:00
01c8e12370
Updates https://github.com/VictoriaMetrics/VictoriaMetrics/issues/6942 Updates https://github.com/VictoriaMetrics/VictoriaMetrics/issues/6706
11 lines
357 B
Text
11 lines
357 B
Text
{% stripspace %}
|
|
PrometheusErrorResponse generates error response for Prometheus Querying API.
|
|
See https://prometheus.io/docs/prometheus/latest/querying/api/#format-overview
|
|
{% func PrometheusErrorResponse(statusCode int, err error) %}
|
|
{
|
|
"status":"error",
|
|
"errorType":"{%d statusCode %}",
|
|
"error": {%q= err.Error() %}
|
|
}
|
|
{% endfunc %}
|
|
{% endstripspace %}
|