{"action":"created","issue":{"url":"https://api.github.com/repos/shazow/urllib3/issues/848","repository_url":"https://api.github.com/repos/shazow/urllib3","labels_url":"https://api.github.com/repos/shazow/urllib3/issues/848/labels{/name}","comments_url":"https://api.github.com/repos/shazow/urllib3/issues/848/comments","events_url":"https://api.github.com/repos/shazow/urllib3/issues/848/events","html_url":"https://github.com/shazow/urllib3/pull/848","id":149238580,"number":848,"title":"Attach last Retry object to response and add Retry history","user":{"login":"palaviv","id":6990375,"avatar_url":"https://avatars.githubusercontent.com/u/6990375?v=3","gravatar_id":"","url":"https://api.github.com/users/palaviv","html_url":"https://github.com/palaviv","followers_url":"https://api.github.com/users/palaviv/followers","following_url":"https://api.github.com/users/palaviv/following{/other_user}","gists_url":"https://api.github.com/users/palaviv/gists{/gist_id}","starred_url":"https://api.github.com/users/palaviv/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/palaviv/subscriptions","organizations_url":"https://api.github.com/users/palaviv/orgs","repos_url":"https://api.github.com/users/palaviv/repos","events_url":"https://api.github.com/users/palaviv/events{/privacy}","received_events_url":"https://api.github.com/users/palaviv/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2016-04-18T18:51:30Z","updated_at":"2016-04-18T19:54:32Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/shazow/urllib3/pulls/848","html_url":"https://github.com/shazow/urllib3/pull/848","diff_url":"https://github.com/shazow/urllib3/pull/848.diff","patch_url":"https://github.com/shazow/urllib3/pull/848.patch"},"body":"This PR is trying to solve both Issue #576 and #578.\r\nThe last Retry object of the request is added to the response object. Thus allowing the user to check if any errors occurred during the request. In addition to give more information to the user the Retry object now has a history attribute. This attribute contains a list of the errors that were thrown at each connection retry.\r\n\r\nexample code:\r\n\r\n    retry = Retry(total=2)\r\n    resp = pool.request('GET', '/', retries=retry)\r\n    if resp.retries.total != 2:\r\n        print(resp.retries.history)  # will show list of errors\r\n"},"comment":{"url":"https://api.github.com/repos/shazow/urllib3/issues/comments/211549930","html_url":"https://github.com/shazow/urllib3/pull/848#issuecomment-211549930","issue_url":"https://api.github.com/repos/shazow/urllib3/issues/848","id":211549930,"user":{"login":"palaviv","id":6990375,"avatar_url":"https://avatars.githubusercontent.com/u/6990375?v=3","gravatar_id":"","url":"https://api.github.com/users/palaviv","html_url":"https://github.com/palaviv","followers_url":"https://api.github.com/users/palaviv/followers","following_url":"https://api.github.com/users/palaviv/following{/other_user}","gists_url":"https://api.github.com/users/palaviv/gists{/gist_id}","starred_url":"https://api.github.com/users/palaviv/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/palaviv/subscriptions","organizations_url":"https://api.github.com/users/palaviv/orgs","repos_url":"https://api.github.com/users/palaviv/repos","events_url":"https://api.github.com/users/palaviv/events{/privacy}","received_events_url":"https://api.github.com/users/palaviv/received_events","type":"User","site_admin":false},"created_at":"2016-04-18T19:54:32Z","updated_at":"2016-04-18T19:54:32Z","body":"How about a new object (\"RetryHistory\" working title) that will contain all the data passed to the Retry.increment: method, url, response, error?"}}