def METHOD_NAME(self, request: PipelineRequest[HTTPRequestType]) -> PipelineResponse[HTTPRequestType, HTTPResponseType]:
    http_request = request.http_request
    response = self.next.METHOD_NAME(request)
    if response.http_response.status_code == 409:
        rp_name = self._check_rp_not_registered_err(response)
        if rp_name:
            url_prefix = self._extract_subscription_url(http_request.url)
            if not self._register_rp(request, url_prefix, rp_name):
                return response
            # Change the 'x-ms-client-request-id' otherwise the Azure endpoint
            # just returns the same 409 payload without looking at the actual query
            if "x-ms-client-request-id" in http_request.headers:
                http_request.headers["x-ms-client-request-id"] = str(uuid.uuid4())
            response = self.next.METHOD_NAME(request)
    return response