diff options
-rw-r--r-- | lib/rbot/core/utils/httputil.rb | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/rbot/core/utils/httputil.rb b/lib/rbot/core/utils/httputil.rb index 0bc579b1..00164616 100644 --- a/lib/rbot/core/utils/httputil.rb +++ b/lib/rbot/core/utils/httputil.rb @@ -502,6 +502,7 @@ class HttpUtil req.body = opts[:body] if req_class == Net::HTTP::Post debug "prepared request: #{req.to_hash.inspect}" + begin get_proxy(uri, opts).start do |http| http.request(req) do |resp| resp['x-rbot-location'] = uri.to_s @@ -531,6 +532,10 @@ class HttpUtil return handle_response(uri, resp, opts, &block) end end + rescue Exception => e + error e + raise e.message + end end # _uri_:: uri to query (URI object or String) |