mirror of
https://git.selfprivacy.org/SelfPrivacy/selfprivacy-rest-api.git
synced 2024-11-25 13:31:27 +00:00
chore: Show the response text when prometheus request fails
This commit is contained in:
parent
d0d3cdacca
commit
021208a4d6
|
@ -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:
|
||||
|
|
|
@ -65,6 +65,10 @@
|
|||
},
|
||||
"roundcube": {
|
||||
"enable": true
|
||||
},
|
||||
"prometheus": {
|
||||
"enable": true,
|
||||
"location": "sdb"
|
||||
}
|
||||
},
|
||||
"volumes": [
|
||||
|
|
Loading…
Reference in a new issue