Zone check isn't resulting to error in case of invalid zone file
Im trying to validate modified zone file and in case of invalid file rollback changes
Expected beh using knotc:
knotc -b zone-freeze example.com.
knotc -b zone-flush example.com.
nano /var/lib/knot/example.com.zone // modifying file
knotc zone-check example.com // resulting to error if zone file is invalid
knotc zone-flush example.com // if error rollback changes
knotc zone-thaw example.com // thaw zone
Code example:
import libknot.control
# Initialization
ctl = libknot.control.KnotCtl()
ctl.connect("/var/run/knot/knot.sock")
ctl.set_timeout(60)
ctl.send_block(cmd="zone-check", zone="example.com") ## how to get an error from zone-check if zone file is invalid?
Code example is not resulting to error if zone file is invalid. Receive block also doesn't help
How to validate zone file and get error if its invalid?