Skip to content

Commit 455bbfe

Browse files
committed
fix: Lower log level for KeyError in bulk config get
1 parent ef715d8 commit 455bbfe

1 file changed

Lines changed: 5 additions & 2 deletions

File tree

src/WebAppDIRAC/WebApp/handler/ConfigurationManagerHandler.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -103,8 +103,11 @@ def __getSubnodesForPath(self, sectionPath, retData):
103103
sectionCfg = self.__configData["cfgData"].getCFG()
104104
for section in [section for section in sectionPath.split("/") if not section.strip() == ""]:
105105
sectionCfg = sectionCfg[section]
106-
except Exception as v:
107-
self.log.exception("Section does not exist", f"{sectionPath} -> {v!r}")
106+
except KeyError as err:
107+
self.log.info("Client requested non-existent section", f"{sectionPath} -> {err!r}")
108+
return False
109+
except Exception as err:
110+
self.log.exception("Error loading config section", f"{sectionPath} -> {err!r}")
108111
return False
109112

110113
for entryName in sectionCfg.listAll():

0 commit comments

Comments
 (0)