added extra debug when post fails with 400
This commit is contained in:
parent
545129c8a5
commit
6d353317f0
11
push.py
11
push.py
|
@ -90,18 +90,21 @@ url_exceptions = {
|
|||
"ftntfw": "ftnt-fw-",
|
||||
"chkpfw": "chkp-fw-",
|
||||
"ocivcnconnectors": "oci-vcn-connectors",
|
||||
"ftntfwservices": "ftnt-fw-services"
|
||||
"ftntfwservices": "ftnt-fw-services",
|
||||
"chkpfwservices": "chkp-fw-services"
|
||||
}
|
||||
|
||||
# URL Exceptions creating credentials
|
||||
service_credentials = {
|
||||
"panfwservices": "pan",
|
||||
"ftntfwservices": "ftntfw"
|
||||
"ftntfwservices": "ftntfw",
|
||||
"chkpfwservices": "chkp-fw"
|
||||
}
|
||||
|
||||
# URL Exceptions creating instance credentials
|
||||
service_instance_credentials = {
|
||||
"ftntfwservices": "ftntfw-"
|
||||
"ftntfwservices": "ftntfw-",
|
||||
"chkpfwservices": "chkp-fw-"
|
||||
}
|
||||
|
||||
# Credential Types
|
||||
|
@ -123,6 +126,8 @@ def alkira_post(session, uri, body):
|
|||
url = f'{ALKIRA_BASE_URI}{uri}'
|
||||
try:
|
||||
response = session.post(url, data=json.dumps(body), headers=headers)
|
||||
if response.status_code == 400:
|
||||
logging.debug(response.content)
|
||||
response.raise_for_status()
|
||||
except Exception as e:
|
||||
logging.error(f'Error: {str(e)}')
|
||||
|
|
Loading…
Reference in New Issue