VictoriaMetrics/lib/httpserver/prometheus_error_response.qtpl

12 lines
357 B
Text
Raw Permalink Normal View History

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