lib/airbrake/sender.rb in airbrake-3.0.9 vs lib/airbrake/sender.rb in airbrake-3.1.0
- old
+ new
@@ -36,11 +36,11 @@
http = setup_http_connection
response = begin
http.post(url.path, data, HEADERS)
rescue *HTTP_ERRORS => e
- log :error, "Timeout while contacting the Airbrake server."
+ log :error, "Unable to contact the Airbrake server. HTTP Error=#{e}"
nil
end
case response
when Net::HTTPSuccess then
@@ -48,11 +48,11 @@
else
log :error, "Failure: #{response.class}", response
end
if response && response.respond_to?(:body)
- error_id = response.body.match(%r{<error-id[^>]*>(.*?)</error-id>})
+ error_id = response.body.match(%r{<id[^>]*>(.*?)</id>})
error_id[1] if error_id
end
rescue => e
log :error, "[Airbrake::Sender#send_to_airbrake] Cannot send notification. Error: #{e.class} - #{e.message}\nBacktrace:\n#{e.backtrace.join("\n\t")}"
nil
@@ -98,14 +98,9 @@
http.open_timeout = http_open_timeout
if secure?
http.use_ssl = true
- # if use_system_ssl_cert_chain? && File.exist?(OpenSSL::X509::DEFAULT_CERT_FILE)
- # http.ca_file = OpenSSL::X509::DEFAULT_CERT_FILE
- # else
- # http.ca_file = Sender.local_cert_path # ca-bundle.crt built from source, see resources/README.md
- # end
http.ca_file = Airbrake.configuration.ca_bundle_path
http.verify_mode = OpenSSL::SSL::VERIFY_PEER
else
http.use_ssl = false
end