Skip to content

Commit ba2286f

Browse files
authored
invoke error_handler on Committee::NotFound (#427)
My rationale is that an exception is raised if `raise` is true, but there is no opportunity to handle this error differently if otherwise.
1 parent 417cc2f commit ba2286f

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

lib/committee/middleware/request_validation.rb

+1
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ def handle(request)
2020
raise if @raise
2121
return @error_class.new(400, :bad_request, $!.message, request).render unless @ignore_error
2222
rescue Committee::NotFound => e
23+
handle_exception($!, request.env)
2324
raise if @raise
2425
return @error_class.new(404, :not_found, e.message, request).render unless @ignore_error
2526
rescue JSON::ParserError

0 commit comments

Comments
 (0)