lib/fiveruns/dash/store/http.rb in fiveruns-dash-ruby-0.8.3 vs lib/fiveruns/dash/store/http.rb in fiveruns-dash-ruby-0.8.4
- old
+ new
@@ -66,22 +66,22 @@
Fiveruns::Dash.logger.debug "Received no response from Dash service"
return false
end
case response.code.to_i
when 201
- data = JSON.load(response.body)
- set_trace_contexts(data)
+ # data = Fiveruns::JSON.load(response.body)
+ # set_trace_contexts(data)
true
when 400..499
Fiveruns::Dash.logger.warn "Could not access Dash service (#{response.code.to_i}, #{response.body.inspect})"
false
else
Fiveruns::Dash.logger.debug "Received unknown response from Dash service (#{response.inspect})"
false
end
- rescue JSON::ParserError => e
+ rescue Fiveruns::JSON::ParserError => e
puts response.body
- Fiveruns::Dash.logger.error "Received non-JSON response (#{response.inspect})"
+ Fiveruns::Dash.logger.error "Received non-FiverunsJSON response (#{response.inspect})"
false
end
def set_trace_contexts(data)
trace_contexts = data['traces']
\ No newline at end of file