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>
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: