link_info: handle HTTP errors correctly