def process_request(url: str, method: HttpMethod, **kwargs) -> requests.Response:
    """
    Function to abort request if request to external
    uri was not successful or if there were any
    connection errors (then returns 503 Service Unavailable)
    :param url: external API URI
    :type url: str
    :param method: HTTP method to send (GET, POST etc)
    :type method: HttpMethod
    :param kwargs: parameters to request (headers, params, body etc)
    :type kwargs: dict
    :return: response
    :rtype: requests.Response
    """
    try:
        http_method = map_type_to_method(method)
        logging.debug(f"Try to proceed {method.name} request to {url}")
        response = http_method(url, **kwargs)
        response.raise_for_status()
    except requests.RequestException as e:
        response = e.response
        logging.error(f"Error while {method.name} request to {url}")
        logging.exception(e)
        if response:
            logging.error(json.dumps(response.json()), exc_info=True)

    return response

    Function to abort request if request to external
    uri was not successful or if there were any
    connection errors (then returns 503 Service Unavailable)
    :param url: external API URI
    :type url: str
    :param method: HTTP method to send (GET, POST etc)
    :type method: HttpMethod
    :param kwargs: parameters to request (headers, params, body etc)
    :type kwargs: dict
    :return: response
    :rtype: requests.Response
    
src/robusta/integrations/common/requests.py