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

pull/62538/head
chkp-orso 5 years ago committed by Daniel Mellado
parent 2232232b45
commit 55f285a384

@ -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:

Loading…
Cancel
Save