Integrations/AzureCompute_v2/AzureCompute_v2.py
def screen_errors(error_message, *args, **kwargs):
    """
    Make sure that the values passed as args and the keys in kwargs do not appear in error messages

    parameter: (string) error_message
        The error message that needs to be screened for the values in args and the keys
        in kwargs

    parameter: (list) *args
        Arguments that need to be screened from error outputs and that will be replaced
        by x's enclosed by a '<' symbol on the left, and a '>' symbol on the right

    parameter: (dict) **kwargs
        Key-value pairs for each of which the user wishes to screen the key identifier string
        from the error_message and replace it with its assigned value string. Useful for
        when the user wishes to replace sensitive data with a value of their choosing
        instead of the default x's enclosed by '<', and '>' symbols on the left and right respectively

    returns:
        The error message free of sensitive information as determined by the values of
        args and the keys of kwargs
    """
    if isinstance(error_message, Exception):
        # Format Exception object as String
        error_as_dict = vars(error_message)
        updated_error_message = ''
        for key, val in error_as_dict.items():
            if updated_error_message != '':
                updated_error_message += '\n' + str(key) + ': ' + str(val)
            else:
                updated_error_message += str(key) + ': ' + str(val)
    elif not isinstance(error_message, str):
        # If not an Exception or a String, try to cast to a string
        updated_error_message = str(error_message)
    else:
        updated_error_message = error_message

    for argument in args:
        if argument != '' and argument in updated_error_message:
            length = len(argument)
            placeholder = '<' + 'x' * length + '>'
            updated_error_message = updated_error_message.replace(argument, placeholder)

    for key, value in kwargs.items():
        if key != '' and key in updated_error_message:
            updated_error_message = updated_error_message.replace(key, value)

    return updated_error_message

    Make sure that the values passed as args and the keys in kwargs do not appear in error messages

    parameter: (string) error_message
        The error message that needs to be screened for the values in args and the keys
        in kwargs

    parameter: (list) *args
        Arguments that need to be screened from error outputs and that will be replaced
        by x's enclosed by a '<' symbol on the left, and a '>' symbol on the right

    parameter: (dict) **kwargs
        Key-value pairs for each of which the user wishes to screen the key identifier string
        from the error_message and replace it with its assigned value string. Useful for
        when the user wishes to replace sensitive data with a value of their choosing
        instead of the default x's enclosed by '<', and '>' symbols on the left and right respectively

    returns:
        The error message free of sensitive information as determined by the values of
        args and the keys of kwargs
    
Make sure that the values passed as args and the keys in kwargs do not appear in error messages
parameter: (string) error_message
The error message that needs to be screened for the values in args and the keys
in kwargs



(dict) **kwargs
Key-value pairs for each of which the user wishes to screen the key identifier string
from the error_message and replace it with its assigned value string.

The error message free of sensitive information as determined by the values of
args and the keys of kwargs
Make sure that the values passed as args and the keys in kwargs do not appear in error messages parameter : ( string ) error_message The error message that needs to be screened for the values in args and the keys in kwargs ( dict ) ** kwargs Key - value pairs for each of which the user wishes to screen the key identifier string from the error_message and replace it with its assigned value string . The error message free of sensitive information as determined by the values of args and the keys of kwargs
def screen_errors(error_message, *args, **kwargs):
    if isinstance(error_message, Exception):
        error_as_dict = vars(error_message)
        updated_error_message = ''
        for key, val in error_as_dict.items():
            if updated_error_message != '':
                updated_error_message += '\n' + str(key) + ': ' + str(val)
            else:
                updated_error_message += str(key) + ': ' + str(val)
    elif not isinstance(error_message, str):
        updated_error_message = str(error_message)
    else:
        updated_error_message = error_message
    for argument in args:
        if argument != '' and argument in updated_error_message:
            length = len(argument)
            placeholder = '<' + 'x' * length + '>'
            updated_error_message = updated_error_message.replace(argument, placeholder)
    for key, value in kwargs.items():
        if key != '' and key in updated_error_message:
            updated_error_message = updated_error_message.replace(key, value)
    return updated_error_message
def screen_errors ( error_message , * args , ** kwargs ) : if isinstance ( error_message , Exception ) : error_as_dict = vars ( error_message ) updated_error_message = '' for key , val in error_as_dict . items ( ) : if updated_error_message != '' : updated_error_message += '\n' + str ( key ) + ': ' + str ( val ) else : updated_error_message += str ( key ) + ': ' + str ( val ) elif not isinstance ( error_message , str ) : updated_error_message = str ( error_message ) else : updated_error_message = error_message for argument in args : if argument != '' and argument in updated_error_message : length = len ( argument ) placeholder = '<' + 'x' * length + '>' updated_error_message = updated_error_message . replace ( argument , placeholder ) for key , value in kwargs . items ( ) : if key != '' and key in updated_error_message : updated_error_message = updated_error_message . replace ( key , value ) return updated_error_message
Make sure that the values passed as args and the keys in kwargs do not appear in error messages
parameter: (string) error_message
The error message that needs to be screened for the values in args and the keys
in kwargs
Make sure that the values passed as args and the keys in kwargs do not appear in error messages parameter : ( string ) error_message The error message that needs to be screened for the values in args and the keys in kwargs
"""
    Make sure that the values passed as args and the keys in kwargs do not appear in error messages

    parameter: (string) error_message
        The error message that needs to be screened for the values in args and the keys
        in kwargs

    parameter: (list) *args
        Arguments that need to be screened from error outputs and that will be replaced
        by x's enclosed by a '<' symbol on the left, and a '>' symbol on the right

    parameter: (dict) **kwargs
        Key-value pairs for each of which the user wishes to screen the key identifier string
        from the error_message and replace it with its assigned value string. Useful for
        when the user wishes to replace sensitive data with a value of their choosing
        instead of the default x's enclosed by '<', and '>' symbols on the left and right respectively

    returns:
        The error message free of sensitive information as determined by the values of
        args and the keys of kwargs
    """ # Format Exception object as String # If not an Exception or a String, try to cast to a string
error_message