detect parse error in header