diff options
author | mguetlein <martin.guetlein@gmail.com> | 2010-06-02 15:45:49 +0200 |
---|---|---|
committer | mguetlein <martin.guetlein@gmail.com> | 2010-06-02 15:45:49 +0200 |
commit | 0a6f578f5f4a9e3503541dc6b5b9f1c0cfb9e8e0 (patch) | |
tree | 00bd8ddf05e5cf09aa2529c7d3902027a25df3be | |
parent | 593ab333363318ffddb00003ac846e8cfa8e6f44 (diff) |
change error size restriction
-rw-r--r-- | lib/rest_client_wrapper.rb | 2 | ||||
-rw-r--r-- | lib/task.rb | 3 |
2 files changed, 2 insertions, 3 deletions
diff --git a/lib/rest_client_wrapper.rb b/lib/rest_client_wrapper.rb index 83089d0..4f8b0ee 100644 --- a/lib/rest_client_wrapper.rb +++ b/lib/rest_client_wrapper.rb @@ -9,7 +9,7 @@ module OpenTox def initialize(code, body, uri, payload, headers) self.code = code - self.body = body + self.body = body.to_s[0..1000] self.uri = uri self.payload = payload self.headers = headers diff --git a/lib/task.rb b/lib/task.rb index 1d2c4c2..60c1159 100644 --- a/lib/task.rb +++ b/lib/task.rb @@ -78,8 +78,7 @@ module OpenTox end def error(description) - description = description[0..999] if description.to_s.size>1000 - RestClientWrapper.put(File.join(@uri,'Error'),{:description => description}) + RestClientWrapper.put(File.join(@uri,'Error'),{:description => description.to_s[0..2000]}) reload end |