[//]: # (werk v2)
# agent_netapp_ontap: Fix TypeError for SnapVault
key | value
---------- | ---
date | 2024-06-26T11:18:02+00:00
version | 2.3.0p8
class | fix
edition | cre
component | checks
level | 1
compatible | yes
Previously, `agent_netapp_ontap` would crash if the API returned any `SnapMirror`
objects:
```
File
"/omd/sites/mysite/local/lib/python3/cmk/special_agents/agent_netapp_ontap.py",
line 827, in write_sections
write_section("snapvault", fetch_snapmirror(connection), logger)
File
"/omd/sites/mysite/local/lib/python3/cmk/special_agents/agent_netapp_ontap.py",
line 32, in write_section
writer.append_json(element.model_dump(exclude_unset=True, exclude_none=False))
File
"/omd/sites/mysite/lib/python3/cmk/special_agents/v0_unstable/agent_common.py",
line 62, in append_json
self.writeline(json.dumps(data, sort_keys=True))
File "/omd/sites/mysite/lib/python3.12/json/__init__.py", line 238, in dumps
**kw).encode(obj)
File "/omd/sites/mysite/lib/python3.12/json/encoder.py", line 200, in encode
chunks = self.iterencode(o, _one_shot=True)
File "/omd/sites/mysite/lib/python3.12/json/encoder.py", line 258, in
iterencode
return _iterencode(o, 0)
File "/omd/sites/mysite/lib/python3.12/json/encoder.py", line 180, in default
raise TypeError(f'Object of type {o.__class__.__name__} '
```