diff options
-rw-r--r-- | lib/nickserver/dispatcher.rb | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/lib/nickserver/dispatcher.rb b/lib/nickserver/dispatcher.rb index 869f721..07571d5 100644 --- a/lib/nickserver/dispatcher.rb +++ b/lib/nickserver/dispatcher.rb @@ -62,9 +62,11 @@ module Nickserver end def proxy_error_response - exception = handler_chain.rescued_exceptions.first - if exception - Nickserver::Response.new(502, exception.to_s) + exc = handler_chain.rescued_exceptions.first + if exc + puts " Error: #{exc}" + Nickserver::Response.new 502, + %Q|{"error": "#{exc}"}| end end |