diff options
author | mguetlein <martin.guetlein@gmail.com> | 2011-01-21 11:52:53 +0100 |
---|---|---|
committer | mguetlein <martin.guetlein@gmail.com> | 2011-01-21 11:52:53 +0100 |
commit | 0e759bee80e2668e1fec7b741a4ea18015f98b84 (patch) | |
tree | fa4d00fcbcaee092d5f16eb7ec785b0ed8f11f91 /lib/rest_client_wrapper.rb | |
parent | 9d06bd3024139f2bfee4722c7536ee4ffa99fe32 (diff) |
simplify error handling once again, and adding http code
Diffstat (limited to 'lib/rest_client_wrapper.rb')
-rw-r--r-- | lib/rest_client_wrapper.rb | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/lib/rest_client_wrapper.rb b/lib/rest_client_wrapper.rb index 5bc8072..3d7b72e 100644 --- a/lib/rest_client_wrapper.rb +++ b/lib/rest_client_wrapper.rb @@ -131,15 +131,15 @@ module OpenTox def self.raise_ot_error( code, message, body, uri, headers, payload=nil ) error = OpenTox::RestCallError.new("REST call returned error: '"+message.to_s+"'") - error.code = code - error.uri = uri - error.headers = headers - error.payload = payload + error.rest_code = code + error.rest_uri = uri + error.rest_headers = headers + error.rest_payload = payload parsed = OpenTox::ErrorReport.parse(body) if body if parsed error.errorCause = parsed else - error.body = body + error.rest_body = body end raise error end |