Skip to content

Commit

Permalink
use de-JSON'd objects instead of raw strings
Browse files Browse the repository at this point in the history
  • Loading branch information
rtomayko committed Jan 27, 2010
1 parent 9e25089 commit 0c040e2
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions github-services.rb
Original file line number Diff line number Diff line change
Expand Up @@ -54,12 +54,13 @@ def service(name)
yield data, payload
end
rescue => boom
hook_data = params[:data].dup
# redact sensitive info in hook_data hash
hook_data = data || params[:data]
%w[password token].each { |key| hook_data[key] &&= '<redacted>' }
report_exception boom,
:hook_name => name,
:hook_data => hook_data,
:hook_payload => params[:payload]
:hook_data => hook_data.inspect,
:hook_payload => (payload || params[:payload]).inspect
raise
end
end
Expand Down

0 comments on commit 0c040e2

Please sign in to comment.