VictoriaMetrics/lib/httpserver/prometheus_error_response.qtpl

12 lines
357 B
Plaintext

{% 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 %}