mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-05-07 05:42:50 +00:00
Improve error handling for cs tests.
This commit is contained in:
@@ -21,6 +21,7 @@ from lib.util import (
|
||||
|
||||
from lib.http import (
|
||||
HttpClient,
|
||||
HttpError,
|
||||
urlparse,
|
||||
)
|
||||
|
||||
@@ -242,7 +243,10 @@ class CsCloudProvider(CloudProvider):
|
||||
response = client.get(endpoint)
|
||||
|
||||
if response.status_code == 200:
|
||||
return response.json()
|
||||
try:
|
||||
return response.json()
|
||||
except HttpError as ex:
|
||||
display.error(ex)
|
||||
|
||||
time.sleep(30)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user