projects
/
arvados.git
/ blobdiff
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge branch '1495-crunch-documentation'
[arvados.git]
/
services
/
api
/
app
/
controllers
/
application_controller.rb
diff --git
a/services/api/app/controllers/application_controller.rb
b/services/api/app/controllers/application_controller.rb
index dfe615309010f7dcaef20661ddcf83eb5a50412e..434b09572b40b64af026e27a43962b422aeea7c6 100644
(file)
--- a/
services/api/app/controllers/application_controller.rb
+++ b/
services/api/app/controllers/application_controller.rb
@@
-83,7
+83,8
@@
class ApplicationController < ActionController::Base
else
errors = [e.inspect]
end
else
errors = [e.inspect]
end
- render json: { errors: errors }, status: 422
+ status = e.respond_to?(:http_status) ? e.http_status : 422
+ render json: { errors: errors }, status: status
end
def render_not_found(e=ActionController::RoutingError.new("Path not found"))
end
def render_not_found(e=ActionController::RoutingError.new("Path not found"))