Skip to content

Commit

Permalink
Remove rescue_from ActionController::RoutingError
Browse files Browse the repository at this point in the history
The ActionController::RoutingError is raised when Rails tries to match the request with a route.
This happens before Rails even initializes a controller therefore ApplicationController
never has a chance to rescue the exception.
  • Loading branch information
vpereira committed Aug 9, 2020
1 parent 1bcbee9 commit b128ee6
Showing 1 changed file with 0 additions and 4 deletions.
4 changes: 0 additions & 4 deletions src/api/app/controllers/concerns/rescue_handler.rb
Original file line number Diff line number Diff line change
Expand Up @@ -43,10 +43,6 @@ module RescueHandler
render_error message: exception.message, status: 404, errorcode: 'not_found'
end

rescue_from ActionController::RoutingError do |exception|
render_error message: exception.message, status: 404, errorcode: 'not_route'
end

rescue_from Pundit::NotAuthorizedError do |exception|
message = 'You are not authorized to perform this action.'

Expand Down

0 comments on commit b128ee6

Please sign in to comment.