From 089c73459cb2fede0f1c2b99e349253546296d6b Mon Sep 17 00:00:00 2001 From: Alexandru Dan Duna Date: Mon, 22 Jun 2026 19:33:16 +0300 Subject: [PATCH 1/3] Modify error handling for HTTP configurations access Handle PermissionError without raising an exception to allow fallback to environment variables. --- nisystemlink/clients/core/_http_configuration_manager.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/nisystemlink/clients/core/_http_configuration_manager.py b/nisystemlink/clients/core/_http_configuration_manager.py index 31e84cc3..22d5e4c7 100644 --- a/nisystemlink/clients/core/_http_configuration_manager.py +++ b/nisystemlink/clients/core/_http_configuration_manager.py @@ -141,9 +141,9 @@ def _read_configurations(cls) -> Dict[str, core.HttpConfiguration]: try: json_files = path.glob("*.json") except PermissionError as e: - raise core.ApiException( - "Not authorized to access HTTP configurations directory: " + str(e) - ) + # don't except when lacking read (list) permission on the HttpConfigurations directory, + # to allow falling back to reading envvars + return configurations except OSError as e: raise core.ApiException( "Error while accessing HTTP configurations directory: " + str(e) From df3f42c0a5e94c4db42d6aeda4ece407289ad269 Mon Sep 17 00:00:00 2001 From: Alexandru Dan Duna Date: Mon, 22 Jun 2026 19:34:54 +0300 Subject: [PATCH 2/3] Fix comment wording in _http_configuration_manager.py --- nisystemlink/clients/core/_http_configuration_manager.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nisystemlink/clients/core/_http_configuration_manager.py b/nisystemlink/clients/core/_http_configuration_manager.py index 22d5e4c7..a4bda395 100644 --- a/nisystemlink/clients/core/_http_configuration_manager.py +++ b/nisystemlink/clients/core/_http_configuration_manager.py @@ -141,7 +141,7 @@ def _read_configurations(cls) -> Dict[str, core.HttpConfiguration]: try: json_files = path.glob("*.json") except PermissionError as e: - # don't except when lacking read (list) permission on the HttpConfigurations directory, + # don't raise when lacking read (list) permission on the HttpConfigurations directory, # to allow falling back to reading envvars return configurations except OSError as e: From 27e34765f9295cfb2e62d47e88896396723d8388 Mon Sep 17 00:00:00 2001 From: Alexandru Dan Duna Date: Mon, 22 Jun 2026 19:38:37 +0300 Subject: [PATCH 3/3] Remove exception variable --- nisystemlink/clients/core/_http_configuration_manager.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nisystemlink/clients/core/_http_configuration_manager.py b/nisystemlink/clients/core/_http_configuration_manager.py index a4bda395..1f428cf5 100644 --- a/nisystemlink/clients/core/_http_configuration_manager.py +++ b/nisystemlink/clients/core/_http_configuration_manager.py @@ -140,7 +140,7 @@ def _read_configurations(cls) -> Dict[str, core.HttpConfiguration]: return configurations try: json_files = path.glob("*.json") - except PermissionError as e: + except PermissionError: # don't raise when lacking read (list) permission on the HttpConfigurations directory, # to allow falling back to reading envvars return configurations