summaryrefslogtreecommitdiff
path: root/lib/rest-client-wrapper.rb
diff options
context:
space:
mode:
authorgebele <gebele@in-silico.ch>2016-12-12 09:15:48 +0000
committergebele <gebele@in-silico.ch>2016-12-12 09:15:48 +0000
commitda086fad5b45c0d7b59feb40d0108ac620613933 (patch)
tree7e9cf8c9332e30552ab255ee9b30e04e904977b4 /lib/rest-client-wrapper.rb
parent32a16d99b51642cac8e75f90c43753d8d05ab770 (diff)
parent4570f11444bc10da88d849e9a2812e95a8933c8a (diff)
merged development
Diffstat (limited to 'lib/rest-client-wrapper.rb')
-rw-r--r--lib/rest-client-wrapper.rb6
1 files changed, 0 insertions, 6 deletions
diff --git a/lib/rest-client-wrapper.rb b/lib/rest-client-wrapper.rb
index 9321a75..2073be2 100644
--- a/lib/rest-client-wrapper.rb
+++ b/lib/rest-client-wrapper.rb
@@ -55,14 +55,8 @@ module OpenTox
if [301, 302, 307].include? response.code and request.method == :get
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}"
error = known_errors.collect{|e| e if e[:code] == response.code}.compact.first
begin # errors are returned as error reports in json, try to parse
- # TODO: may be the reason for failure of task.rb -n test_11_wait_for_error_task
content = JSON.parse(response)
msg = content["message"].to_s
cause = content["errorCause"].to_s