Skip to content
Merged
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
7 changes: 5 additions & 2 deletions lib/raven/client.rb
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,15 @@ def initialize(configuration)
def send(event)
return false unless configuration_allows_sending

# Convert to hash
event = event.to_hash

if !@state.should_try?
Raven.logger.error("Not sending event due to previous failure(s): #{get_log_message(event)}")
return
end

Raven.logger.debug "Sending event #{event.id} to Sentry"
Raven.logger.debug "Sending event #{event['id']} to Sentry"

content_type, encoded_data = encode(event)

Expand Down Expand Up @@ -70,7 +73,7 @@ def encode(event)
end

def get_log_message(event)
(event && event.message) || '<no message value>'
(event && event['message']) || '<no message value>'
end

def transport
Expand Down