chore: Show the response text when prometheus request fails

This commit is contained in:
Inex Code 2024-07-29 18:33:03 +03:00
parent d0d3cdacca
commit 021208a4d6
2 changed files with 6 additions and 2 deletions

View file

@ -70,7 +70,7 @@ class MonitoringQueries:
)
if response.status_code != 200:
return MonitoringQueryError(
error="Prometheus returned unexpected HTTP status code"
error=f"Prometheus returned unexpected HTTP status code. Error: {response.text}"
)
json = response.json()
if result_type and json["data"]["resultType"] != result_type:
@ -96,7 +96,7 @@ class MonitoringQueries:
)
if response.status_code != 200:
return MonitoringQueryError(
error="Prometheus returned unexpected HTTP status code"
error=f"Prometheus returned unexpected HTTP status code. Error: {response.text}"
)
json = response.json()
if result_type and json["data"]["resultType"] != result_type:

View file

@ -65,6 +65,10 @@
},
"roundcube": {
"enable": true
},
"prometheus": {
"enable": true,
"location": "sdb"
}
},
"volumes": [