Raise HTTP error on HTTP response codes >= 400
This commit is contained in:
parent
3f044b20d6
commit
0488f934e2
1 changed files with 2 additions and 0 deletions
|
@ -197,6 +197,8 @@ def _get_datasource(profile, name):
|
|||
auth=_get_auth(profile),
|
||||
timeout=profile.get('grafana_timeout', 3),
|
||||
)
|
||||
if response.status_code >= 400:
|
||||
response.raise_for_status()
|
||||
data = response.json()
|
||||
for datasource in data:
|
||||
if datasource['name'] == name:
|
||||
|
|
Loading…
Reference in a new issue