topos: handle return code for parse_headers()