def check_error(http):
    """
    Checks for http errors (400 series) and returns True if an error exists.

    Parameters
    ----------
    http : addinfourl whose fp is a socket._fileobject

    Returns
    -------
    has_error : bool
    """
    err = http.code
    if 400<= err < 500:
        print("HTTP error {}. Make sure your PV exists.".format(err))
        return True
    return False