mirror of
https://github.com/VictoriaMetrics/VictoriaMetrics.git
synced 2024-12-24 03:06:48 +01:00
12 lines
327 B
Plaintext
12 lines
327 B
Plaintext
|
{% 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 %}
|