integration-testing/client/CasperClient/casper_client/casper_client.py
def api(function):
    """
    Decorator of API functions that protects user code from
    unknown exceptions raised by gRPC or internal API errors.
    It will catch all exceptions and throw InternalError.

    :param function: function to be decorated
    :return:
    """
    @functools.wraps(function)
    def wrapper(*args, **kwargs):
        try:
            return function(*args, **kwargs)
        except Exception as e:
            raise InternalError() from e

    return wrapper

    Decorator of API functions that protects user code from
    unknown exceptions raised by gRPC or internal API errors.
    It will catch all exceptions and throw InternalError.

    :param function: function to be decorated
    :return:
    
Decorator of API functions that protects user code from
unknown exceptions raised by gRPC or internal API errors.
It will catch all exceptions and throw InternalError.
Decorator of API functions that protects user code from unknown exceptions raised by gRPC or internal API errors . It will catch all exceptions and throw InternalError .
def api(function):
    @functools.wraps(function)
    def wrapper(*args, **kwargs):
        try:
            return function(*args, **kwargs)
        except Exception as e:
            raise InternalError() from e
    return wrapper
def api ( function ) : @ functools . wraps ( function ) def wrapper ( * args , ** kwargs ) : try : return function ( * args , ** kwargs ) except Exception as e : raise InternalError ( ) from e return wrapper
Decorator of API functions that protects user code from
unknown exceptions raised by gRPC or internal API errors.
Decorator of API functions that protects user code from unknown exceptions raised by gRPC or internal API errors .
"""
    Decorator of API functions that protects user code from
    unknown exceptions raised by gRPC or internal API errors.
    It will catch all exceptions and throw InternalError.

    :param function: function to be decorated
    :return:
    """
None
function
function to be decorated
function to be decorated