summaryrefslogtreecommitdiff
path: root/lib/error.rb
diff options
context:
space:
mode:
authorChristoph Helma <helma@in-silico.ch>2012-03-29 14:50:03 +0200
committerChristoph Helma <helma@in-silico.ch>2012-03-29 14:50:03 +0200
commit97f9367b05a9a665022adc5c3f0a988acb1c4fa3 (patch)
tree0a716fa05fc4c8beacde349b13e7d749c1b23b9e /lib/error.rb
parent0d457e40c005ba4209ec7e3093aa06d73d65a442 (diff)
RestClientWrapper follows redirects
Diffstat (limited to 'lib/error.rb')
-rw-r--r--lib/error.rb11
1 files changed, 6 insertions, 5 deletions
diff --git a/lib/error.rb b/lib/error.rb
index e12f140..579f42b 100644
--- a/lib/error.rb
+++ b/lib/error.rb
@@ -52,11 +52,12 @@ module OpenTox
# Errors received from RestClientWrapper calls
class RestCallError < Error
- attr_accessor :request, :response
- def initialize request, response, message
+ attr_accessor :request#, :response
+ def initialize message, request, uri
+ #def initialize request, response, message
@request = request
- @response = response
- super 502, message, request.url
+ #@response = response
+ super 502, message, uri
end
end
@@ -78,7 +79,7 @@ module OpenTox
cut_index = backtrace.size-1 if cut_index < 0
@report[RDF::OT.errorDetails] = backtrace[0..cut_index].join("\n")
@report[RDF::OT.errorDetails] += "REST paramenters:\n#{error.request.args.inspect}" if defined? error.request
- @report[RDF::OT.message] += "\n" + error.response.body.to_s if defined? error.response
+ #@report[RDF::OT.message] += "\n" + error.response.body.to_s if defined? error.response
# TODO fix Error cause
# should point to another errorReport, but errorReports do not have URIs
# create a separate service?