diff options
author | Micha Rautenberg <mr@mrautenberg.de> | 2015-10-21 11:57:10 +0200 |
---|---|---|
committer | Micha Rautenberg <mr@mrautenberg.de> | 2015-10-21 11:57:10 +0200 |
commit | 903a831a26e97c4a03541a90b8e6a6be1737c15c (patch) | |
tree | 6d722e3ca8048ee01ad7476c69a7ec5302613d65 | |
parent | b04afdac0e1f673ae7c182c97835cf5e65459fa9 (diff) |
remove subjectid and connection credentials from error messagetoxbank
-rw-r--r-- | lib/rest-client-wrapper.rb | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/rest-client-wrapper.rb b/lib/rest-client-wrapper.rb index 7011eca..9c2a685 100644 --- a/lib/rest-client-wrapper.rb +++ b/lib/rest-client-wrapper.rb @@ -57,10 +57,10 @@ module OpenTox response.follow_redirection(request, result) elsif response.code >= 400 and !URI.task?(uri) #TODO add parameters to error-report - #parameters = request.args - #parameters[:headers][:subjectid] = "REMOVED" if parameters[:headers] and parameters[:headers][:subjectid] - #parameters[:url] = parameters[:url].gsub(/(http|https|)\:\/\/[a-zA-Z0-9\-]+\:[a-zA-Z0-9]+\@/, "REMOVED@") if parameters[:url] - #message += "\nREST parameters:\n#{parameters.inspect}" + parameters = request.args + parameters[:headers][:subjectid] = "REMOVED" if parameters[:headers] and parameters[:headers][:subjectid] + parameters[:url] = parameters[:url].gsub(/(http|https|)\:\/\/[a-zA-Z0-9\-]+\:[a-zA-Z0-9]+\@/, "REMOVED@") if parameters[:url] + message += "\nREST parameters:\n#{parameters.inspect}" error = known_errors.collect{|e| e if e[:code] == response.code}.compact.first begin # errors are returned as error reports in turtle, try to parse content = {} |