Skip to content

Commit

Permalink
fix: resolve app failures
Browse files Browse the repository at this point in the history
Removed unknown constants from application_controller.rb as well as reordered rescues to ensure specific errors are not caught early by the generic `Exception` rescue
  • Loading branch information
jonrandahl committed Mar 7, 2024
1 parent 45d559e commit 6c8c09c
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions app/controllers/application_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,10 @@ def log_request_result
end

unless Rails.application.config.consider_all_requests_local
rescue_from Exception, with: :render_exception
rescue_from ActiveRecord::RecordNotFound, with: :render404
rescue_from ActionController::BadRequest, with: :render400
rescue_from ActionController::RoutingError, with: :render404
rescue_from ActionController::InvalidCrossOriginRequest, with: :render403
rescue_from ActionController::RoutingError, with: :render404
rescue_from ActionController::BadRequest, with: :render400
rescue_from Exception, with: :render_exception
end

def render_exception(exception)
Expand Down

0 comments on commit 6c8c09c

Please sign in to comment.