Push hdrCheck() error code handling over to python side