VictoriaMetrics/app/vmselect/prometheus/error_response.qtpl

12 lines
327 B
Plaintext
Raw Normal View History

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