Issue with Ansible Playbook Execution Behavior with Different API Versions

I am encountering an issue while running an Ansible playbook in an environment where the Ansible and Python versions remain consistent, but the VPLEX API version changes. Specifically, the behavior of the playbook differs between VPLEX API versions 7.0 and 9.0. On discussion VPLEX API team , they suggested there is no changes in API sides.

** VPLEX API 7.0**: When a GET call fails with a 404 error code, the playbook continues to execute the subsequent tasks without any interruption. No tasks fail, and the playbook completes its execution as expected.
Here is execution logs which throws the error:

2025-04-06 04:21:39,278 dellemc_vplex_extent.py INFO : Got the details of storage volume VPD83T3:60000970000120001737533030414442 in cluster-1
2025-04-06 04:21:39,278 dellemc_vplex_extent.py ERROR : Before extent get calls ------>3
2025-04-06 04:21:39,416 connectionpool.py DEBUG : https://10.226.81.244:443 "GET /vplex/v2/clusters/cluster-1/extents/ansible_extent_ID HTTP/1.1" 404 None
2025-04-06 04:21:39,417 rest.py DEBUG : response body: {"error_code":404,"message":"Resource not found: ansible_extent_ID","path_parameters":{"extent":"ansible_extent_ID","cluster":"cluster-1"},"uri":"/vplex/v2/clusters/cluster-1/extents/ansible_extent_ID"}
2025-04-06 04:21:39,418 dellemc_vplex_extent.py ERROR : Could not get extent ansible_extent_ID from cluster-1 due to error: Resource not found: ansible_extent_ID
(404)
Reason: 
HTTP response headers: HTTPHeaderDict({'Server': 'nginx', 'Date': 'Sun, 06 Apr 2025 03:20:18 GMT', 'Content-Type': 'application/json', 'Transfer-Encoding': 'chunked', 'Connection': 'keep-alive', 'X-Frame-Options': 'DENY', 'X-Content-Type-Options': 'nosniff', 'X-XSS-Protection': '1; mode=block', 'Strict-Transport-Security': 'max-age=31536000; includeSubDomains'})
HTTP response body: {"error_code":404,"message":"Resource not found: ansible_extent_ID","path_parameters":{"extent":"ansible_extent_ID","cluster":"cluster-1"},"uri":"/vplex/v2/clusters/cluster-1/extents/ansible_extent_ID"}


2025-04-06 04:21:39,418 dellemc_vplex_extent.py ERROR : After get calls of extent ----->4
2025-04-06 04:21:39,418 dellemc_vplex_extent.py ERROR : Getting the details of the extent if extent_name is present
2025-04-06 04:21:39,554 connectionpool.py DEBUG : https://10.226.81.244:443 "GET /vplex/v2/clusters/cluster-1/extents/ansible_extent_ID HTTP/1.1" 404 Non

However after 404, the execution continues with next execution

** VPLEX API 9.0**: When a GET call fails with the same 404 error code, the playbook immediately stops execution and exits, displaying an rc=1 in ansible playbook . This abrupt termination prevents the playbook from continuing with the remaining tasks. Could you please suggest some debugging.

2025-04-06 04:08:01,388 dellemc_vplex_extent.py INFO : Got the details of storage volume Symm0581_0122AF in cluster-1
2025-04-06 04:08:01,388 dellemc_vplex_extent.py ERROR : Before extent get calls ------>3
2025-04-06 04:08:01,526 connectionpool.py DEBUG : https://10.226.81.244:443 "GET /vplex/v2/clusters/cluster-1/extents/ansible_extent_name HTTP/1.1" 404 None
2025-04-06 04:08:01,527 rest.py DEBUG : response body: {"error_code":404,"message":"Resource not found: ansible_extent_name","path_parameters":{"extent":"ansible_extent_name","cluster":"cluster-1"},"uri":"/vplex/v2/clusters/cluster-1/extents/ansible_extent_name"}

Here after error code 404 execution stops and playbook throws error.

TASK [Create an Extent with storage volume name] **********************************************************************
fatal: [localhost]: FAILED! => {"changed": false, "module_stderr": "2025-04-06 03:54:26,226 DEBUG Starting new HTTPS connection (1): 10.226.81.244:443\n2025-04-06 03:54:26,951 DEBUG https://10.226.81.244:443 \"GET /vplex/v2/clusters/ HTTP/1.1\" 200 None\n2025-04-06 03:54:26,951 DEBUG response body: [{\"allow_auto_join\":true,\"cluster_id\":1,\"connected\":true,\"directors\":[\"/vplex/v2/directors/director-1-1-A\",\"/vplex/v2/directors/director-1-1-B\"],\"health_indications\":[\"3 unhealthy Devices or storage-volumes\"],\"health_state\":\"degraded\",\"ip_address\":\"10.226.81.243\",\"is_local\":true,\"island_id\":1,\"operational_status\":\"degraded\",\"system_time\":\"Sun Apr 06 02:53:05 UTC 2025\",\"top_level_assembly\":\"468TGNH\",\"transition_indications\":[\"meta data problem\"],\"transition_progress\":[],\"name\":\"cluster-1\"},{\"allow_auto_join\":true,\"cluster_id\":2,\"connected\":true,\"directors\":[\"/vplex/v2/directors/director-2-1-A\",\"/vplex/v2/directors/director-2-1-B\"],\"health_indications\":[],\"health_state\":\"ok\",\"ip_address\":\"10.226.81.245\",\"is_local\":false,\"island_id\":1,\"operational_status\":\"ok\",\"system_time\":\"Sun Apr 06 02:53:06 UTC 2025\",\"top_level_assembly\":\"468WGNH\",\"transition_indications\":[],\"transition_progress\":[],\"name\":\"cluster-2\"}]\n2025-04-06 03:54:27,135 DEBUG https://10.226.81.244:443 \"GET /vplex/v2/versions HTTP/1.1\" 200 None\n2025-04-06 03:54:27,135 DEBUG response body: [{\"name\":\"director-2-1-A\",\"version\":\"9.0.1.0.0-11\"},{\"name\":\"director-1-1-A\",\"version\":\"9.0.1.0.0-11\"},{\"name\":\"director-2-1-B\",\"version\":\"9.0.1.0.0-11\"},{\"name\":\"director-1-1-B\",\"version\":\"9.0.1.0.0-11\"}]\n2025-04-06 03:54:27,500 DEBUG https://10.226.81.244:443 \"GET /vplex/v2/clusters/cluster-1 HTTP/1.1\" 200 None\n2025-04-06 03:54:27,500 DEBUG response body: {\"allow_auto_join\":true,\"cluster_id\":1,\"connected\":true,\"directors\":[\"/vplex/v2/directors/director-1-1-A\",\"/vplex/v2/directors/director-1-1-B\"],\"health_indications\":[\"3 unhealthy Devices or storage-volumes\"],\"health_state\":\"degraded\",\"ip_address\":\"10.226.81.243\",\"is_local\":true,\"island_id\":1,\"operational_status\":\"degraded\",\"system_time\":\"Sun Apr 06 02:53:06 UTC 2025\",\"top_level_assembly\":\"468TGNH\",\"transition_indications\":[\"meta data problem\"],\"transition_progress\":[],\"name\":\"cluster-1\"}\n2025-04-06 03:54:27,689 DEBUG https://10.226.81.244:443 \"GET /vplex/v2/clusters/cluster-1/storage_volumes/Symm0581_0122AF HTTP/1.1\" 200 None\n2025-04-06 03:54:27,689 DEBUG response body: {\"application_consistent\":false,\"block_count\":2621280,\"block_size\":4096,\"capacity\":10736762880,\"health_indications\":[],\"health_state\":\"ok\",\"io_status\":\"alive\",\"io_error_status\":\"ok\",\"itls\":[{\"lun\":\"3\",\"initiator\":\"0xc001445a80dc0900\",\"target\":\"0x50000972001b2402\"},{\"lun\":\"3\",\"initiator\":\"0xc001445a80dc0900\",\"target\":\"0x50000972001b2442\"},{\"lun\":\"3\",\"initiator\":\"0xc001445a80dc0800\",\"target\":\"0x50000972001b2402\"},{\"lun\":\"3\",\"initiator\":\"0xc001445a80dc0800\",\"target\":\"0x50000972001b2442\"},{\"lun\":\"3\",\"initiator\":\"0xc001445a80dd0800\",\"target\":\"0x50000972001b2402\"},{\"lun\":\"3\",\"initiator\":\"0xc001445a80dd0800\",\"target\":\"0x50000972001b2442\"},{\"lun\":\"3\",\"initiator\":\"0xc001445a80dd0900\",\"target\":\"0x50000972001b2442\"},{\"lun\":\"3\",\"initiator\":\"0xc001445a80dd0900\",\"target\":\"0x50000972001b2402\"}],\"largest_free_chunk\":10736762880,\"operational_status\":\"ok\",\"provision_type\":\"legacy\",\"storage_array_name\":\"EMC-SYMMETRIX-120001737\",\"storage_array_family\":\"symmetrix\",\"storage_volumetype\":\"normal\",\"system_id\":\"VPD83T3:60000970000120001737533030414445\",\"thin_capable\":true,\"thin_rebuild\":true,\"use\":\"claimed\",\"used_by\":[],\"vendor_specific_name\":\"EMC\",\"name\":\"Symm0581_0122AF\"}\n2025-04-06 03:54:27,829 DEBUG https://10.226.81.244:443 \"GET /vplex/v2/clusters/cluster-1/extents/ansible_extent_name HTTP/1.1\" 404 None\n2025-04-06 03:54:27,829 DEBUG response body: {\"error_code\":404,\"message\":\"Resource not found: ansible_extent_name\",\"path_parameters\":{\"extent\":\"ansible_extent_name\",\"cluster\":\"cluster-1\"},\"uri\":\"/vplex/v2/clusters/cluster-1/extents/ansible_extent_name\"}\nTraceback (most recent call last):\n  File \"/root/.ansible/tmp/ansible-tmp-1743908065.6289713-1966260-216211893607640/AnsiballZ_dellemc_vplex_extent.py\", line 107, in <module>\n    _ansiballz_main()\n    ~~~~~~~~~~~~~~~^^\n  File \"/root/.ansible/tmp/ansible-tmp-1743908065.6289713-1966260-216211893607640/AnsiballZ_dellemc_vplex_extent.py\", line 99, in _ansiballz_main\n    invoke_module(zipped_mod, temp_path, ANSIBALLZ_PARAMS)\n    ~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n  File \"/root/.ansible/tmp/ansible-tmp-1743908065.6289713-1966260-216211893607640/AnsiballZ_dellemc_vplex_extent.py\", line 47, in invoke_module\n    runpy.run_module(mod_name='ansible_collections.dellemc.vplex.plugins.modules.dellemc_vplex_extent', init_globals=dict(_module_fqn='ansible_collections.dellemc.vplex.plugins.modules.dellemc_vplex_extent', _modlib_path=modlib_path),\n    ~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n                     run_name='__main__', alter_sys=True)\n                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n  File \"<frozen runpy>\", line 226, in run_module\n  File \"<frozen runpy>\", line 98, in _run_module_code\n  File \"<frozen runpy>\", line 88, in _run_code\n  File \"/tmp/ansible_dellemc_vplex_extent_payload_2j1pf_gw/ansible_dellemc_vplex_extent_payload.zip/ansible_collections/dellemc/vplex/plugins/modules/dellemc_vplex_extent.py\", line 677, in <module>\n  File \"/tmp/ansible_dellemc_vplex_extent_payload_2j1pf_gw/ansible_dellemc_vplex_extent_payload.zip/ansible_collections/dellemc/vplex/plugins/modules/dellemc_vplex_extent.py\", line 673, in main\n  File \"/tmp/ansible_dellemc_vplex_extent_payload_2j1pf_gw/ansible_dellemc_vplex_extent_payload.zip/ansible_collections/dellemc/vplex/plugins/modules/dellemc_vplex_extent.py\", line 526, in perform_module_operation\n  File \"/tmp/ansible_dellemc_vplex_extent_payload_2j1pf_gw/ansible_dellemc_vplex_extent_payload.zip/ansible_collections/dellemc/vplex/plugins/modules/dellemc_vplex_extent.py\", line 299, in get_extent\n  File \"/root/collections/ansible_collections/dellemc/vplex/docs/samples/python-vplex-main/vplexapi-9.0.0/vplexapi_v2/api/extent_api.py\", line 262, in get_extent\n    (data) = self.get_extent_with_http_info(cluster_name, name, **kwargs)  # noqa: E501\n  File \"/root/collections/ansible_collections/dellemc/vplex/docs/samples/python-vplex-main/vplexapi-9.0.0/vplexapi_v2/api/extent_api.py\", line 331, in get_extent_with_http_info\n    return self.api_client.call_api(\n           ~~~~~~~~~~~~~~~~~~~~~~~~^\n        '/clusters/{cluster_name}/extents/{name}', 'GET',\n        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n    ...<11 lines>...\n        _request_timeout=params.get('_request_timeout'),\n        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n        collection_formats=collection_formats)\n        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n  File \"/root/collections/ansible_collections/dellemc/vplex/docs/samples/python-vplex-main/vplexapi-9.0.0/vplexapi_v2/api_client.py\", line 326, in call_api\n    return self.__call_api(resource_path, method,\n           ~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^\n                           path_params, query_params, header_params,\n                           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n    ...<2 lines>...\n                           _return_http_data_only, collection_formats,\n                           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n                           _preload_content, _request_timeout)\n                           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n  File \"/root/collections/ansible_collections/dellemc/vplex/docs/samples/python-vplex-main/vplexapi-9.0.0/vplexapi_v2/api_client.py\", line 158, in __call_api\n    response_data = self.request(\n        method, url, query_params=query_params, headers=header_params,\n        post_params=post_params, body=body,\n        _preload_content=_preload_content,\n        _request_timeout=_request_timeout)\n  File \"/root/collections/ansible_collections/dellemc/vplex/docs/samples/python-vplex-main/vplexapi-9.0.0/vplexapi_v2/api_client.py\", line 348, in request\n    return self.rest_client.GET(url,\n           ~~~~~~~~~~~~~~~~~~~~^^^^^\n                                query_params=query_params,\n                                ^^^^^^^^^^^^^^^^^^^^^^^^^^\n                                _preload_content=_preload_content,\n                                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n                                _request_timeout=_request_timeout,\n                                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n                                headers=headers)\n                                ^^^^^^^^^^^^^^^^\n  File \"/root/collections/ansible_collections/dellemc/vplex/docs/samples/python-vplex-main/vplexapi-9.0.0/vplexapi_v2/rest.py\", line 234, in GET\n    return self.request(\"GET\", url,\n           ~~~~~~~~~~~~^^^^^^^^^^^^\n                        headers=headers,\n                        ^^^^^^^^^^^^^^^^\n                        _preload_content=_preload_content,\n                        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n                        _request_timeout=_request_timeout,\n                        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n                        query_params=query_params)\n                        ^^^^^^^^^^^^^^^^^^^^^^^^^^\n  File \"/root/collections/ansible_collections/dellemc/vplex/docs/samples/python-vplex-main/vplexapi-9.0.0/vplexapi_v2/rest.py\", line 228, in request\n    raise ApiException(http_resp=r)\nvplexapi_v2.rest.ApiException: (404)\nReason: \nHTTP response headers: HTTPHeaderDict({'Server': 'nginx', 'Date': 'Sun, 06 Apr 2025 02:53:06 GMT', 'Content-Type': 'application/json', 'Transfer-Encoding': 'chunked', 'Connection': 'keep-alive', 'X-Frame-Options': 'DENY', 'X-Content-Type-Options': 'nosniff', 'X-XSS-Protection': '1; mode=block', 'Strict-Transport-Security': 'max-age=31536000; includeSubDomains'})\nHTTP response body: {\"error_code\":404,\"message\":\"Resource not found: ansible_extent_name\",\"path_parameters\":{\"extent\":\"ansible_extent_name\",\"cluster\":\"cluster-1\"},\"uri\":\"/vplex/v2/clusters/cluster-1/extents/ansible_extent_name\"}\n\n", "module_stdout": "send: b'GET /vplex/v2/clusters/ HTTP/1.1\\r\\nHost: 10.226.81.244\\r\\nAccept-Encoding: identity\\r\\nAccept: application/json\\r\\nUser-Agent: Swagger-Codegen/1.0.0.0/python\\r\\nAuthorization: Basic c2VydmljZTpNaUBEaW03VA==\\r\\nContent-Type: application/json\\r\\n\\r\\n'\nreply: 'HTTP/1.1 200 \\r\\n'\nheader: Server: nginx\nheader: Date: Sun, 06 Apr 2025 02:53:06 GMT\nheader: Content-Type: application/json\nheader: Transfer-Encoding: chunked\nheader: Connection: keep-alive\nheader: X-Frame-Options: DENY\nheader: X-Content-Type-Options: nosniff\nheader: X-XSS-Protection: 1; mode=block\nheader: X-Total-Count: 2\nheader: Location: /vplex/v2/clusters\nheader: Strict-Transport-Security: max-age=31536000; includeSubDomains\nheader: X-Frame-Options: SAMEORIGIN\nsend: b'GET /vplex/v2/versions HTTP/1.1\\r\\nHost: 10.226.81.244\\r\\nAccept-Encoding: identity\\r\\nAccept: application/json\\r\\nUser-Agent: Swagger-Codegen/1.0.0.0/python\\r\\nAuthorization: Basic c2VydmljZTpNaUBEaW03VA==\\r\\nContent-Type: application/json\\r\\n\\r\\n'\nreply: 'HTTP/1.1 200 \\r\\n'\nheader: Server: nginx\nheader: Date: Sun, 06 Apr 2025 02:53:06 GMT\nheader: Content-Type: application/json\nheader: Transfer-Encoding: chunked\nheader: Connection: keep-alive\nheader: X-Frame-Options: DENY\nheader: X-Content-Type-Options: nosniff\nheader: X-XSS-Protection: 1; mode=block\nheader: X-Total-Count: 4\nheader: Location: /vplex/v2/versions\nheader: Strict-Transport-Security: max-age=31536000; includeSubDomains\nheader: X-Frame-Options: SAMEORIGIN\nsend: b'GET /vplex/v2/clusters/cluster-1 HTTP/1.1\\r\\nHost: 10.226.81.244\\r\\nAccept-Encoding: identity\\r\\nAccept: application/json\\r\\nUser-Agent: Swagger-Codegen/1.0.0.0/python\\r\\nAuthorization: Basic c2VydmljZTpNaUBEaW03VA==\\r\\nContent-Type: application/json\\r\\n\\r\\n'\nreply: 'HTTP/1.1 200 \\r\\n'\nheader: Server: nginx\nheader: Date: Sun, 06 Apr 2025 02:53:06 GMT\nheader: Content-Type: application/json\nheader: Transfer-Encoding: chunked\nheader: Connection: keep-alive\nheader: X-Frame-Options: DENY\nheader: X-Content-Type-Options: nosniff\nheader: X-XSS-Protection: 1; mode=block\nheader: Location: /vplex/v2/clusters/cluster-1\nheader: Strict-Transport-Security: max-age=31536000; includeSubDomains\nheader: X-Frame-Options: SAMEORIGIN\nsend: b'GET /vplex/v2/clusters/cluster-1/storage_volumes/Symm0581_0122AF HTTP/1.1\\r\\nHost: 10.226.81.244\\r\\nAccept-Encoding: identity\\r\\nAccept: application/json\\r\\nUser-Agent: Swagger-Codegen/1.0.0.0/python\\r\\nAuthorization: Basic c2VydmljZTpNaUBEaW03VA==\\r\\nContent-Type: application/json\\r\\n\\r\\n'\nreply: 'HTTP/1.1 200 \\r\\n'\nheader: Server: nginx\nheader: Date: Sun, 06 Apr 2025 02:53:06 GMT\nheader: Content-Type: application/json\nheader: Transfer-Encoding: chunked\nheader: Connection: keep-alive\nheader: X-Frame-Options: DENY\nheader: X-Content-Type-Options: nosniff\nheader: X-XSS-Protection: 1; mode=block\nheader: Location: /vplex/v2/clusters/cluster-1/storage_volumes/Symm0581_0122AF\nheader: Strict-Transport-Security: max-age=31536000; includeSubDomains\nheader: X-Frame-Options: SAMEORIGIN\nsend: b'GET /vplex/v2/clusters/cluster-1/extents/ansible_extent_name HTTP/1.1\\r\\nHost: 10.226.81.244\\r\\nAccept-Encoding: identity\\r\\nAccept: application/json\\r\\nUser-Agent: Swagger-Codegen/1.0.0.0/python\\r\\nAuthorization: Basic c2VydmljZTpNaUBEaW03VA==\\r\\nContent-Type: application/json\\r\\n\\r\\n'\nreply: 'HTTP/1.1 404 \\r\\n'\nheader: Server: nginx\nheader: Date: Sun, 06 Apr 2025 02:53:06 GMT\nheader: Content-Type: application/json\nheader: Transfer-Encoding: chunked\nheader: Connection: keep-alive\nheader: X-Frame-Options: DENY\nheader: X-Content-Type-Options: nosniff\nheader: X-XSS-Protection: 1; mode=block\nheader: Strict-Transport-Security: max-age=31536000; includeSubDomains\n", "msg": "MODULE FAILURE: No start of json char found\nSee stdout/stderr for the exact error", "rc": 1}

PLAY RECAP ************************************************************************************************************
localhost                  : ok=5    changed=2    unreachable=0    failed=1    skipped=0    rescued=0    ignored=0

Env Details :

ansible [core 2.18.0]
  config file = None
  configured module search path = ['/root/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
  ansible python module location = /root/my_env/lib/python3.13/site-packages/ansible
  ansible collection location = /root/collections/ansible_collections/dellemc/vplex/playbooks:/root/collections
  executable location = /root/my_env/bin/ansible
  python version = 3.13.2 (main, Mar 12 2025, 10:44:45) [GCC 11.4.0] (/root/my_env/bin/python3)
  jinja version = 3.1.6
  libyaml = True

OS details : Ubuntu 22.04