[ARVADOS] updated: 5a2dd6a86ac170ea709b60c7f243ba9216cd0843
git at public.curoverse.com
git at public.curoverse.com
Fri Jan 17 15:49:28 EST 2014
Summary of changes:
.../app/controllers/application_controller.rb | 2 +-
apps/workbench/app/models/arvados_api_client.rb | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
via 5a2dd6a86ac170ea709b60c7f243ba9216cd0843 (commit)
from b29b5f97cf4f571114d0c73794b508d65af4331c (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
commit 5a2dd6a86ac170ea709b60c7f243ba9216cd0843
Author: Tom Clegg <tom at curoverse.com>
Date: Fri Jan 17 12:47:09 2014 -0800
Reduce boilerplate on error messages.
"The error message [API 422]" instead of "#<RuntimeError: API error
422: The error message>"
refs #1880
diff --git a/apps/workbench/app/controllers/application_controller.rb b/apps/workbench/app/controllers/application_controller.rb
index d90d68c..201c063 100644
--- a/apps/workbench/app/controllers/application_controller.rb
+++ b/apps/workbench/app/controllers/application_controller.rb
@@ -42,7 +42,7 @@ class ApplicationController < ActionController::Base
if @object.andand.errors.andand.full_messages.andand.any?
@errors = @object.errors.full_messages
else
- @errors = [e.inspect]
+ @errors = [e.to_s]
end
self.render_error status: 422
end
diff --git a/apps/workbench/app/models/arvados_api_client.rb b/apps/workbench/app/models/arvados_api_client.rb
index 35d7526..a8bcb4d 100644
--- a/apps/workbench/app/models/arvados_api_client.rb
+++ b/apps/workbench/app/models/arvados_api_client.rb
@@ -77,7 +77,7 @@ class ArvadosApiClient
if msg.status_code != 200
errors = resp[:errors]
errors = errors.join("\n\n") if errors.is_a? Array
- raise "API error #{msg.status_code}:\n\n#{errors}\n"
+ raise "#{errors} [API: #{msg.status_code}]"
end
if resp[:_profile]
Rails.logger.info "API client: " \
-----------------------------------------------------------------------
hooks/post-receive
--
More information about the arvados-commits
mailing list