about summary refs log tree commit diff
path: root/app/controllers
diff options
context:
space:
mode:
authorEugen Rochko <eugen@zeonfederated.com>2016-11-21 16:19:35 +0100
committerEugen Rochko <eugen@zeonfederated.com>2016-11-21 16:19:35 +0100
commit627a85f4e4019248ea1bfb68a6536a726d8f8f69 (patch)
treeaec45adc8722394c861e2203a825594ff69a30de /app/controllers
parentf88ca4a206767e6ce1e33ee9702087e46aaccdb0 (diff)
Better error message in doorkeeper json response
Diffstat (limited to 'app/controllers')
-rw-r--r--app/controllers/api_controller.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/app/controllers/api_controller.rb b/app/controllers/api_controller.rb
index d880400a8..862358d6e 100644
--- a/app/controllers/api_controller.rb
+++ b/app/controllers/api_controller.rb
@@ -30,8 +30,8 @@ class ApiController < ApplicationController
     render json: { error: 'Remote SSL certificate could not be verified' }, status: 503
   end
 
-  def doorkeeper_unauthorized_render_options(*)
-    { json: { error: 'Not authorized' } }
+  def doorkeeper_unauthorized_render_options(error: nil)
+    { json: { error: (error.try(:description) || 'Not authorized') } }
   end
 
   def doorkeeper_forbidden_render_options(*)