(err)
return err_request, err_response
Parses an instance of RequestException and returns a request
    string and response string tuple
Parses an instance of RequestException and returns a request
    string and response string tuple
Parses an instance of RequestException and returns a request string and response string tuple
def parse_request_exception(err):
    """
    Parses an instance of RequestException and returns a request
    string and response string tuple
    """
    err_request = '{method} {url}\n\n{body}'.format(
        method=err.request.method,
        url=err.request.url,
        body=err.request.body
    ) if err.request.body else ' '.join((err.request.method, err.request.url))
    if err.response:
        err_content = pformat_json(err.response.content)  # pformat_json returns non-JSON values unchanged
        err_response = '\n\n'.join((str(err), err_content))
    else:
        err_response = str(err)
    return err_request, err_response
def parse_request_exception ( err ) : err_request = '{method} {url}\n\n{body}' . format ( method = err . request . method , url = err . request . url , body = err . request . body ) if err . request . body else ' ' . join ( ( err . request . method , err . request . url ) ) if err . response : err_content = pformat_json ( err . response . content ) # pformat_json returns non-JSON values unchanged err_response = '\n\n' . join ( ( str ( err ) , err_content ) ) else : err_response = str ( err ) return err_request , err_response