Example #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))
Example #2
0
def _throw_server_error(resp):
    """Throws an error.

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

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

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

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

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