fix if equals error code if command not found (#62529)

This commit is contained in:
chkp-orso 2019-09-18 18:00:42 +02:00 committed by Daniel Mellado
parent 2232232b45
commit 55f285a384

View file

@ -367,6 +367,8 @@ def api_call_for_rule(module, api_call_object):
# if code is 400 (bad request) or 500 (internal error) - fail
if equals_code == 400 or equals_code == 500:
module.fail_json(msg=equals_response)
if equals_code == 404 and equals_response['code'] == 'generic_err_command_not_found':
module.fail_json(msg='Relevant hotfix is not installed on Check Point server. See sk114661 on Check Point Support Center.')
if module.params['state'] == 'present':
if equals_code == 200: