mirror of
https://git.selfprivacy.org/SelfPrivacy/selfprivacy-rest-api.git
synced 2024-11-21 19:51:28 +00:00
chore: Also show a query when prometheus fails
This commit is contained in:
parent
021208a4d6
commit
60ce3b773d
|
@ -70,7 +70,7 @@ class MonitoringQueries:
|
|||
)
|
||||
if response.status_code != 200:
|
||||
return MonitoringQueryError(
|
||||
error=f"Prometheus returned unexpected HTTP status code. Error: {response.text}"
|
||||
error=f"Prometheus returned unexpected HTTP status code. Error: {response.text}. The query was {query}"
|
||||
)
|
||||
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=f"Prometheus returned unexpected HTTP status code. Error: {response.text}"
|
||||
error=f"Prometheus returned unexpected HTTP status code. Error: {response.text}. The query was {query}"
|
||||
)
|
||||
json = response.json()
|
||||
if result_type and json["data"]["resultType"] != result_type:
|
||||
|
|
Loading…
Reference in a new issue