about summary refs log tree commit homepage
path: root/extras
diff options
context:
space:
mode:
authorEric Wong <e@80x24.org>2015-03-03 07:54:54 +0000
committerEric Wong <e@80x24.org>2015-03-03 07:55:11 +0000
commitc98942ca949e3d210c4c61939f1e3e18ccd466a8 (patch)
tree83c0b449a5fefae3f22c5fd8cef54c952c05a5ac /extras
parent1c5082d515e12d6b65c772018b876d66c7be84ee (diff)
downloadyahns-c98942ca949e3d210c4c61939f1e3e18ccd466a8.tar.gz
It may be useful for us to track down potential errors in
our code or log when an upstream misbehaves.
Diffstat (limited to 'extras')
-rw-r--r--extras/proxy_pass.rb4
1 files changed, 4 insertions, 0 deletions
diff --git a/extras/proxy_pass.rb b/extras/proxy_pass.rb
index 8a32cac..de6a2b1 100644
--- a/extras/proxy_pass.rb
+++ b/extras/proxy_pass.rb
@@ -189,6 +189,10 @@ class ProxyPass # :nodoc:
     res
   rescue => e
     retry if ures && ures.fail_retryable? && request_method != "POST"
+    if defined?(Yahns::Log)
+      logger = env['rack.logger'] and
+        Yahns::Log.exception(logger, 'proxy_pass', e)
+    end
     ERROR_502
   end