{"action":"created","issue":{"url":"https://api.github.com/repos/lostisland/faraday/issues/317","labels_url":"https://api.github.com/repos/lostisland/faraday/issues/317/labels{/name}","comments_url":"https://api.github.com/repos/lostisland/faraday/issues/317/comments","events_url":"https://api.github.com/repos/lostisland/faraday/issues/317/events","html_url":"https://github.com/lostisland/faraday/issues/317","id":21673558,"number":317,"title":"Logger middleware just crashes","user":{"login":"PavelPenkov","id":375548,"avatar_url":"https://avatars.githubusercontent.com/u/375548?v=3","gravatar_id":"","url":"https://api.github.com/users/PavelPenkov","html_url":"https://github.com/PavelPenkov","followers_url":"https://api.github.com/users/PavelPenkov/followers","following_url":"https://api.github.com/users/PavelPenkov/following{/other_user}","gists_url":"https://api.github.com/users/PavelPenkov/gists{/gist_id}","starred_url":"https://api.github.com/users/PavelPenkov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/PavelPenkov/subscriptions","organizations_url":"https://api.github.com/users/PavelPenkov/orgs","repos_url":"https://api.github.com/users/PavelPenkov/repos","events_url":"https://api.github.com/users/PavelPenkov/events{/privacy}","received_events_url":"https://api.github.com/users/PavelPenkov/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":7,"created_at":"2013-10-28T07:19:06Z","updated_at":"2015-07-09T12:08:47Z","closed_at":"2013-10-28T11:35:09Z","body":"This simple program crashes because when logger is called there no headers and body yet. \r\n\r\n```ruby\r\nrequire 'faraday'\r\n\r\nconn = Faraday.new(url: \"http://google.com\") {|config| config.response :logger}\r\nconn.get \"/\"\r\n```\r\n```\r\n/Users/synapse/.rbenv/versions/2.0.0-p247/lib/ruby/gems/2.0.0/gems/faraday-0.8.8/lib/faraday/response/logger.rb:31:in `dump_headers': undefined method `map' for nil:NilClass (NoMethodError)\r\n\tfrom /Users/synapse/.rbenv/versions/2.0.0-p247/lib/ruby/gems/2.0.0/gems/faraday-0.8.8/lib/faraday/response/logger.rb:25:in `block in on_complete'\r\n\tfrom /Users/synapse/.rbenv/versions/2.0.0-p247/lib/ruby/2.0.0/logger.rb:376:in `add'\r\n\tfrom /Users/synapse/.rbenv/versions/2.0.0-p247/lib/ruby/2.0.0/logger.rb:404:in `debug'\r\n\tfrom /Users/synapse/.rbenv/versions/2.0.0-p247/lib/ruby/gems/2.0.0/gems/faraday-0.8.8/lib/faraday/response/logger.rb:25:in `on_complete'\r\n\tfrom /Users/synapse/.rbenv/versions/2.0.0-p247/lib/ruby/gems/2.0.0/gems/faraday-0.8.8/lib/faraday/response.rb:9:in `block in call'\r\n\tfrom /Users/synapse/.rbenv/versions/2.0.0-p247/lib/ruby/gems/2.0.0/gems/faraday-0.8.8/lib/faraday/response.rb:63:in `on_complete'\r\n\tfrom /Users/synapse/.rbenv/versions/2.0.0-p247/lib/ruby/gems/2.0.0/gems/faraday-0.8.8/lib/faraday/response.rb:8:in `call'\r\n\tfrom /Users/synapse/.rbenv/versions/2.0.0-p247/lib/ruby/gems/2.0.0/gems/faraday-0.8.8/lib/faraday/response/logger.rb:20:in `call'\r\n\tfrom /Users/synapse/.rbenv/versions/2.0.0-p247/lib/ruby/gems/2.0.0/gems/faraday-0.8.8/lib/faraday/connection.rb:253:in `run_request'\r\n\tfrom /Users/synapse/.rbenv/versions/2.0.0-p247/lib/ruby/gems/2.0.0/gems/faraday-0.8.8/lib/faraday/connection.rb:106:in `get'\r\n\tfrom faraday_bug.rb:4:in `<main>'\r\n```"},"comment":{"url":"https://api.github.com/repos/lostisland/faraday/issues/comments/119933955","html_url":"https://github.com/lostisland/faraday/issues/317#issuecomment-119933955","issue_url":"https://api.github.com/repos/lostisland/faraday/issues/317","id":119933955,"user":{"login":"henrik","id":216,"avatar_url":"https://avatars.githubusercontent.com/u/216?v=3","gravatar_id":"","url":"https://api.github.com/users/henrik","html_url":"https://github.com/henrik","followers_url":"https://api.github.com/users/henrik/followers","following_url":"https://api.github.com/users/henrik/following{/other_user}","gists_url":"https://api.github.com/users/henrik/gists{/gist_id}","starred_url":"https://api.github.com/users/henrik/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/henrik/subscriptions","organizations_url":"https://api.github.com/users/henrik/orgs","repos_url":"https://api.github.com/users/henrik/repos","events_url":"https://api.github.com/users/henrik/events{/privacy}","received_events_url":"https://api.github.com/users/henrik/received_events","type":"User","site_admin":false},"created_at":"2015-07-09T12:08:47Z","updated_at":"2015-07-09T12:08:47Z","body":"Oh, hey @pengwynn, noticed you're part of this organization as well. Since Mislav didn't reply above, any thoughts on this? Don't mean to step on anyone's toes, though – if Mislav makes these calls I don't want to bypass him :)"}}