instagram oauth2 middelware

keep on getting errors
NoMethodError: undefined method `[]' for nil:NilClass
/path/to/rest-core-2.1.2/lib/rest-core/middleware.rb:44:in `log'
/path/to/rest-core-2.1.2/lib/rest-core/engine/auto.rb:8:in `call'