15
16
17
18
19
20
21
22
|
# File 'lib/exceptional/remote.rb', line 15
def error(exception_data)
Exceptional.logger.info "Notifying Exceptional about an error"
uniqueness_hash = exception_data.uniqueness_hash
hash_param = uniqueness_hash.nil? ? nil: "&hash=#{uniqueness_hash}"
url = "/api/errors?api_key=#{::Exceptional::Config.api_key}&protocol_version=#{::Exceptional::PROTOCOL_VERSION}#{hash_param}"
compressed = Zlib::Deflate.deflate(exception_data.to_json, Zlib::BEST_SPEED)
call_remote(url, compressed)
end
|