def transform_init_state_cause(cause, message):
    """
    Transforms the init failure cause to a user-friendly message.

    :param cause: cause of failure
    :param message: failure message
    :return: transformed message
    """
    return {
        'credentials': 'No or invalid credentials provided',
        'token': 'JWT retrieval failed: [{}]'.format(message),
        'config': 'One or more invalid settings were encountered: [{}]'.format(message),
        'api': 'Client API failed to start: [{}]'.format(message),
    }.get(cause, message)