def __init__(self, *args, **kwargs):
response = kwargs.pop('<STR_LIT>', None)<EOL>self.response = response<EOL>self.request = kwargs.pop('<STR_LIT>', None)<EOL>if (response is not None and not self.request and<EOL>hasattr(response, '<STR_LIT>')):<EOL><INDENT>self.request = self.response.request<EOL><DEDENT>super(RequestException, self).__init__(*args, **kwargs)<EOL>
Initialize RequestException with `request` and `response` objects.