]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
node-proxy: narrow build_data exception handling and re-raise
authorGuillaume Abrioux <gabrioux@ibm.com>
Thu, 29 Jan 2026 10:38:45 +0000 (11:38 +0100)
committerGuillaume Abrioux <gabrioux@ibm.com>
Wed, 18 Feb 2026 08:52:38 +0000 (09:52 +0100)
With this commit, it catches only KeyError, TypeError, and
AttributeError in build_data() instead of Exception, and
re-raise after logging so callers get the actual error.

Fixes: https://tracker.ceph.com/issues/74749
Signed-off-by: Guillaume Abrioux <gabrioux@ibm.com>
src/ceph-node-proxy/ceph_node_proxy/redfishdellsystem.py

index 2c9eee9f0d19a89df3e0c18dd23050433b27e9b9..7078ce384e3483662fc05dbb08ba2614e5c4984e 100644 (file)
@@ -46,9 +46,9 @@ class RedfishDellSystem(BaseRedfishSystem):
                 member_id = d.get('MemberId')
                 result[member_id] = {}
                 result[member_id] = process_data(member_id, fields, d)
-
-        except Exception as e:
+        except (KeyError, TypeError, AttributeError) as e:
             self.log.error(f"Can't build data: {e}")
+            raise
         return normalize_dict(result)
 
     def get_sn(self) -> str: