dig should use a non-zero exit code when an AXFR query fails
Attempting an AXFR using
dig I received a truncated AXFR:
;; communications error to x.x.x.x#53: end of file
It's currently impossible to detect this other than by parsing the file looking for the error or the missing SOA record.
It would be more useful if
dig exited with a non-zero status code when this happens.