Module slack_bolt.lazy_listener.internals
Functions
def build_runnable_function(func: Callable[..., None],
logger: logging.Logger,
request: BoltRequest) ‑> Callable[[], None]-
Expand source code
def build_runnable_function( func: Callable[..., None], logger: Logger, request: BoltRequest, ) -> Callable[[], None]: arg_names = get_arg_names_of_callable(func) @wraps(func) def request_wired_func_wrapper() -> None: try: func( **build_required_kwargs( logger=logger, required_arg_names=arg_names, request=request, response=None, this_func=func, ) ) except Exception as e: logger.error(f"Failed to run an internal function ({e})") return request_wired_func_wrapper