DAL: a failed request reads as empty data (_dal_query returns None) #15

Closed
opened 2026-11-02 08:12:45 +00:00 by christianmanivong · 0 comments
Owner

What happens

_dal_query (napalm_zyxel/zyxel_driver.py ~230-247) catches every exception and returns None:

except Exception:
    return None

Its callers turn None into empty data, so a failed DAL request reads as "nothing configured"; get_facts turns a failed get_interfaces into interface_list=[].

Expected

A failed DAL request raises (ConnectionException for transport/auth errors, RuntimeError naming the endpoint otherwise); empty data only when the gateway answered with none. Test-first: a DAL request raising makes the getter raise.

Priority: P3 — empty gateway state in netOrk after any transient error.

Found during the bug sweep of 2026-11-02 (#13).

## What happens `_dal_query` (`napalm_zyxel/zyxel_driver.py` ~230-247) catches every exception and returns `None`: ```python except Exception: return None ``` Its callers turn `None` into empty data, so a failed DAL request reads as "nothing configured"; `get_facts` turns a failed `get_interfaces` into `interface_list=[]`. ## Expected A failed DAL request raises (`ConnectionException` for transport/auth errors, `RuntimeError` naming the endpoint otherwise); empty data only when the gateway answered with none. Test-first: a DAL request raising makes the getter raise. Priority: P3 — empty gateway state in netOrk after any transient error. Found during the bug sweep of 2026-11-02 (#13).
christianmanivong added the
prio
P3
bug
labels 2026-11-02 08:12:45 +00:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: NAPALM/napalm-zyxel#15