Merge branch '2891-improve-workbench-errors'
[arvados.git] / services / api / app / controllers / arvados / v1 / api_client_authorizations_controller.rb
index 76a228d9d580c21d3483e9a01643255d67c012c4..f365a7fee8996e7c9ba51cdd11bc4d525c3e9193 100644 (file)
@@ -82,7 +82,8 @@ class Arvados::V1::ApiClientAuthorizationsController < ApplicationController
 
   def current_api_client_is_trusted
     unless Thread.current[:api_client].andand.is_trusted
-      render :json => { errors: ['Forbidden: this API client cannot manipulate other clients\' access tokens.'] }.to_json, status: 403
+      send_error('Forbidden: this API client cannot manipulate other clients\' access tokens.',
+                 status: 403)
     end
   end
 end