This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# frozen_string_literal: true | |
module Devise | |
# Failure application that will be called every time :warden is thrown from | |
# any strategy or hook. This application overrides the default Devise | |
# failure application in order to render messages as JSON. | |
class ApiFailureApp < Devise::FailureApp | |
def respond | |
json_api_error_response | |
end |