I have a Rails 4 application using Doorkeeper to authenticate with most controllers. When I go to one of these limited routes, I see a blank page. I noticed in my terminal that Puma says:
Filter chain stopped as #Proc: 0x007fd650803350 @ / ... / doorkeeper-0.7.2 / lib / doorkeeper / helpers / filter.rb: 8 displayed or redirected Completed 401 Unauthorized in 1 ms (ActiveRecord: 0.0ms)
How can I catch such 401 unauthorized errors so that I can display a custom page? My goal is to display a JSON response with an authentication message, and not just show a blank white page.
source
share