Forget about wrapping the error
This commit is contained in:
parent
3645416c8d
commit
6d91d43e9f
|
|
@ -290,7 +290,7 @@ class NetbirdApi:
|
||||||
}
|
}
|
||||||
peers = []
|
peers = []
|
||||||
response = requests.request("GET", url, headers=headers)
|
response = requests.request("GET", url, headers=headers)
|
||||||
if re.match('4\\d\\d', response.status_code):
|
if re.match('4\d\d', response.status_code):
|
||||||
raise Exception(f"{response.status_code}: {response.text}\nPlease check the API Key and URL.")
|
raise Exception(f"{response.status_code}: {response.text}\nPlease check the API Key and URL.")
|
||||||
|
|
||||||
peer_json = json.loads(response.text)
|
peer_json = json.loads(response.text)
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue