VictoriaMetrics/lib/httpserver/prometheus_error_response.qtpl

12 lines
357 B
Plaintext
Raw Normal View History

2019-05-22 23:16:55 +02:00
{% stripspace %}
PrometheusErrorResponse generates error response for Prometheus Querying API.
2019-05-22 23:16:55 +02:00
See https://prometheus.io/docs/prometheus/latest/querying/api/#format-overview
{% func PrometheusErrorResponse(statusCode int, err error) %}
2019-05-22 23:16:55 +02:00
{
"status":"error",
"errorType":"{%d statusCode %}",
"error": {%q= err.Error() %}
}
{% endfunc %}
{% endstripspace %}