Skip to content

Commit

Permalink
log even if error
Browse files Browse the repository at this point in the history
  • Loading branch information
sorah committed Oct 31, 2015
1 parent c1d9d50 commit e8cc613
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion 5f/webapp/ruby/app.rb
Expand Up @@ -167,8 +167,14 @@ def fetch_http(headers, params, call_uri, conf)

s = Time.now
res = @client.request(call_uri, req)
res.value
e = Time.now

begin
res.value
rescue Exception => e
$stderr.puts "[API CALL][HTTP][ERROR] #{method} #{call_uri} (#{"%.2f" % (e-s)}s, #{e.inspect})"
raise
end
$stderr.puts "[API CALL][HTTP] #{method} #{call_uri} (#{"%.2f" % (e-s)}s)"
JSON.parse(res.body)
end
Expand Down

0 comments on commit e8cc613

Please sign in to comment.