summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/rest_client_wrapper.rb2
-rw-r--r--lib/task.rb3
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