How to use the zulip.integrations.bridge_with_matrix.matrix_bridge.Bridge_FatalMatrixException function in zulip

To help you get started, we’ve selected a few zulip examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github zulip / python-zulip-api / zulip / integrations / bridge_with_matrix / matrix_bridge.py View on Github external
def matrix_join_room(matrix_client, matrix_config):
    # type: (Any, Dict[str, Any]) -> Any
    try:
        room = matrix_client.join_room(matrix_config["room_id"])
        return room
    except MatrixRequestError as exception:
        if exception.code == 403:
            raise Bridge_FatalMatrixException("Room ID/Alias in the wrong format")
        else:
            raise Bridge_FatalMatrixException("Couldn't find room.")
github zulip / python-zulip-api / zulip / integrations / bridge_with_matrix / matrix_bridge.py View on Github external
def matrix_login(matrix_client, matrix_config):
    # type: (Any, Dict[str, Any]) -> None
    try:
        matrix_client.login_with_password(matrix_config["username"],
                                          matrix_config["password"])
    except MatrixRequestError as exception:
        if exception.code == 403:
            raise Bridge_FatalMatrixException("Bad username or password.")
        else:
            raise Bridge_FatalMatrixException("Check if your server details are correct.")
    except MissingSchema as exception:
        raise Bridge_FatalMatrixException("Bad URL format.")
github zulip / python-zulip-api / zulip / integrations / bridge_with_matrix / matrix_bridge.py View on Github external
def matrix_login(matrix_client, matrix_config):
    # type: (Any, Dict[str, Any]) -> None
    try:
        matrix_client.login_with_password(matrix_config["username"],
                                          matrix_config["password"])
    except MatrixRequestError as exception:
        if exception.code == 403:
            raise Bridge_FatalMatrixException("Bad username or password.")
        else:
            raise Bridge_FatalMatrixException("Check if your server details are correct.")
    except MissingSchema as exception:
        raise Bridge_FatalMatrixException("Bad URL format.")
github zulip / python-zulip-api / zulip / integrations / bridge_with_matrix / matrix_bridge.py View on Github external
def matrix_login(matrix_client, matrix_config):
    # type: (Any, Dict[str, Any]) -> None
    try:
        matrix_client.login_with_password(matrix_config["username"],
                                          matrix_config["password"])
    except MatrixRequestError as exception:
        if exception.code == 403:
            raise Bridge_FatalMatrixException("Bad username or password.")
        else:
            raise Bridge_FatalMatrixException("Check if your server details are correct.")
    except MissingSchema as exception:
        raise Bridge_FatalMatrixException("Bad URL format.")