Debug nil responses.
This commit is contained in:
parent
248fa1a9a7
commit
7790f59b81
|
@ -27,6 +27,20 @@ require 'travis/api/v2/http'
|
||||||
# run Travis::Api::App.new
|
# run Travis::Api::App.new
|
||||||
#
|
#
|
||||||
# Requires TLS in production.
|
# Requires TLS in production.
|
||||||
|
class ResponseInspect
|
||||||
|
def initialize(app)
|
||||||
|
@app = app
|
||||||
|
end
|
||||||
|
|
||||||
|
def call(env)
|
||||||
|
status, headers, response = @app.call(env)
|
||||||
|
if response.nil?
|
||||||
|
puts "Error: nil response"
|
||||||
|
end
|
||||||
|
[status, headers, response]
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
module Travis::Api
|
module Travis::Api
|
||||||
class App
|
class App
|
||||||
autoload :AccessToken, 'travis/api/app/access_token'
|
autoload :AccessToken, 'travis/api/app/access_token'
|
||||||
|
@ -102,6 +116,7 @@ module Travis::Api
|
||||||
entitystore: "memcached://#{memcache_servers}/body-#{Travis::Api::App.deploy_sha}"
|
entitystore: "memcached://#{memcache_servers}/body-#{Travis::Api::App.deploy_sha}"
|
||||||
end
|
end
|
||||||
|
|
||||||
|
use ResponseInspect
|
||||||
use Rack::Deflater
|
use Rack::Deflater
|
||||||
use Rack::PostBodyContentTypeParser
|
use Rack::PostBodyContentTypeParser
|
||||||
use Rack::JSONP
|
use Rack::JSONP
|
||||||
|
|
Loading…
Reference in New Issue
Block a user