lib/httpx/adapters/faraday.rb in httpx-0.11.3 vs lib/httpx/adapters/faraday.rb in httpx-0.12.0

- old
+ new

@@ -121,15 +121,13 @@ def respond_to_missing?(meth) @env.respond_to?(meth) || super end def method_missing(meth, *args, &blk) - if @env && @env.respond_to?(meth) - @env.__send__(meth, *args, &blk) - else - super - end + return super unless @env && @env.respond_to?(meth) + + @env.__send__(meth, *args, &blk) end end include RequestMixin @@ -195,10 +193,10 @@ response.raise_for_status unless response.is_a?(::HTTPX::Response) save_response(env, response.status, response.body.to_s, response.headers, response.reason) do |response_headers| response_headers.merge!(response.headers) end @app.call(env) - rescue OpenSSL::SSL::SSLError => e + rescue ::HTTPX::TLSError => e raise SSL_ERROR, e rescue Errno::ECONNABORTED, Errno::ECONNREFUSED, Errno::ECONNRESET, Errno::EHOSTUNREACH,