Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion lib/segment/analytics/request.rb
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ def post(write_key, batch)
if exception
logger.error(exception.message)
exception.backtrace.each { |line| logger.error(line) }
Response.new(-1, "Connection error: #{exception}")
Response.new(-1, exception.to_s)
else
last_response
end
Expand Down
2 changes: 1 addition & 1 deletion spec/segment/analytics/request_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -232,7 +232,7 @@ class Analytics

it 'has a connection error' do
error = subject.post(write_key, batch).error
expect(error).to match(/Connection error/)
expect(error).to match(/Malformed JSON/)
end

it_behaves_like('retried request', 200, 'Malformed JSON ---')
Expand Down