Skip to content

Commit

Permalink
chore: raise exceptions in get_proxy_dict
Browse files Browse the repository at this point in the history
  • Loading branch information
hetangmodi-crest committed Nov 20, 2024
1 parent 954e792 commit 1df48e7
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions solnlib/conf_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -560,8 +560,8 @@ def get_proxy_dict(
proxy_stanza: str = "proxy",
**kwargs,
) -> Union[Dict[str, str], NoReturn]:
"""This function returns the log level for the addon from configuration
file.
"""This function returns the proxy settings for the addon from
configuration file.
Arguments:
logger: Logger.
Expand Down Expand Up @@ -590,13 +590,13 @@ def get_proxy_dict(
realm=f"__REST_CREDENTIAL__#{app_name}#configs/conf-{conf_name}",
)
conf = cfm.get_conf(conf_name)
except ConfManagerException:
logger.error(f"Failed to fetch configuration file '{conf_name}'.")
except Exception:
raise ConfManagerException(f"Failed to fetch configuration file '{conf_name}'.")
else:
try:
proxy_dict = conf.get(proxy_stanza)
except ConfStanzaNotExistException:
logger.error(
except Exception:
raise ConfStanzaNotExistException(
f"Failed to fetch '{proxy_stanza}' from the configuration file '{conf_name}'. "
)
else:
Expand Down

0 comments on commit 1df48e7

Please sign in to comment.