plataformatec/devise — pull request #3085 by pboling (2014-06-23 23:30:06+00:00)
Title: guard recall_app() to allow for alternate rack failure apps

Single line of code to allow for using Warden managed by Devise in an app where Rack apps (e.g. Grape) are mounted within Rails' routes.rb.

This change adds a single conditional guard to `FailureApp#recall_app()` to allow for alternate rack failure apps passed with` warden.authenticate(recall: )`.

Without this Devise always hijacks 401 errors thrown with `:warden` from Grape. But Grape needs to manage it's own error statuses, and wants the 401 to be a 401 in the API.

This change is likely applicable on up the release chain, but we are still stuck on legacy for other reasons.