astroquery/utils/tap/taputils.py
def parse_http_response_error(responseStr, status):
    """Extracts an HTTP error message from an HTML response.

    Parameters
    ----------
    responseStr : HTTP response, mandatory
        HTTP response

    Returns
    -------
    A string with the response error message.
    """
    pos1 = responseStr.find(TAP_UTILS_HTTP_ERROR_MSG_START)
    if pos1 == -1:
        return parse_http_votable_response_error(responseStr, status)
    pos2 = responseStr.find('</li>', pos1)
    if pos2 == -1:
        return parse_http_votable_response_error(responseStr, status)
    msg = responseStr[(pos1 + len(TAP_UTILS_HTTP_ERROR_MSG_START)):pos2]
    return f"Error {status}:\n{msg}"
Extracts an HTTP error message from an HTML response.

    Parameters
    ----------
    responseStr : HTTP response, mandatory
        HTTP response

    Returns
    -------
    A string with the response error message.
    
Extracts an HTTP error message from an HTML response.
Parameters

responseStr : HTTP response, mandatory
HTTP response

Returns

A string with the response error message.
Extracts an HTTP error message from an HTML response . Parameters responseStr : HTTP response mandatory HTTP response Returns A string with the response error message .
def parse_http_response_error(responseStr, status):
    pos1 = responseStr.find(TAP_UTILS_HTTP_ERROR_MSG_START)
    if pos1 == -1:
        return parse_http_votable_response_error(responseStr, status)
    pos2 = responseStr.find('</li>', pos1)
    if pos2 == -1:
        return parse_http_votable_response_error(responseStr, status)
    msg = responseStr[(pos1 + len(TAP_UTILS_HTTP_ERROR_MSG_START)):pos2]
    return f"Error {status}:\n{msg}"
def parse_http_response_error ( responseStr , status ) : pos1 = responseStr . find ( TAP_UTILS_HTTP_ERROR_MSG_START ) if pos1 == - 1 : return parse_http_votable_response_error ( responseStr , status ) pos2 = responseStr . find ( '</li>' , pos1 ) if pos2 == - 1 : return parse_http_votable_response_error ( responseStr , status ) msg = responseStr [ ( pos1 + len ( TAP_UTILS_HTTP_ERROR_MSG_START ) ) : pos2 ] return f"Error {status}:\n{msg}"
Extracts an HTTP error message from an HTML response.
Extracts an HTTP error message from an HTML response .
"""Extracts an HTTP error message from an HTML response.

    Parameters
    ----------
    responseStr : HTTP response, mandatory
        HTTP response

    Returns
    -------
    A string with the response error message.
    """
responseStr
status