Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Raise error in controller method #430

Merged
merged 1 commit into from
Nov 28, 2015
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion app/controllers/devise_token_auth/passwords_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ def edit
config: params[:config]
}))
else
raise ActionController::RoutingError.new('Not Found')
render_edit_error
end
end

Expand Down Expand Up @@ -179,6 +179,10 @@ def render_create_error
}, status: @error_status
end

def render_edit_error
raise ActionController::RoutingError.new('Not Found')
end

def render_update_error_unauthorized
render json: {
success: false,
Expand Down