Esempio n. 1
0
def _throw_uncontrolled_server_error(resp):
    """Throws an unknown server error.

    """
    raise exceptions.WebServiceException(
        "An uncontrolled server side failure has occurred: {0}".format(
            resp.text))
Esempio n. 2
0
def _throw_server_error(resp):
    """Throws an error.

    """
    raise exceptions.WebServiceException(
        "A server side failure has occurred: {0}".format(resp.text))
Esempio n. 3
0
def _throw_timeout_error():
    """Throws an error.

    """
    raise exceptions.WebServiceException(
        "Remote API server connection timed out.")
Esempio n. 4
0
def _throw_http_error():
    """Throws an error.

    """
    raise exceptions.WebServiceException(
        "Invalid HTTP response from remote API server.")
Esempio n. 5
0
def _throw_not_found_error():
    """Throws an error.

    """
    raise exceptions.WebServiceException("Could not find remote resource.")
Esempio n. 6
0
def _throw_connection_error():
    """Throws an error.

    """
    raise exceptions.WebServiceException(
        "Could not connect to remote API server.")