Skip to content

Commit

Permalink
invoke error_handler on Committee::NotFound (#427)
Browse files Browse the repository at this point in the history
My rationale is that an exception is raised if `raise` is true, but there is no opportunity to handle this error differently if otherwise.
  • Loading branch information
brandonc authored Sep 11, 2024
1 parent 417cc2f commit ba2286f
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions lib/committee/middleware/request_validation.rb
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ def handle(request)
raise if @raise
return @error_class.new(400, :bad_request, $!.message, request).render unless @ignore_error
rescue Committee::NotFound => e
handle_exception($!, request.env)
raise if @raise
return @error_class.new(404, :not_found, e.message, request).render unless @ignore_error
rescue JSON::ParserError
Expand Down

0 comments on commit ba2286f

Please sign in to comment.