diff --git a/push.py b/push.py index 3c470f9..13e2d20 100755 --- a/push.py +++ b/push.py @@ -136,8 +136,9 @@ 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.error(response.content) + match int(str(response.status_code)[0]): + case 4: + logging.error(response.content) response.raise_for_status() except Exception as e: logging.error(f'Error: {str(e)}')