mirror of
				https://gitea.invidious.io/iv-org/shard-kemal.git
				synced 2024-08-15 00:53:36 +00:00 
			
		
		
		
	Make error handlers also work for filters
This commit is contained in:
		
							parent
							
								
									ceb962df6b
								
							
						
					
					
						commit
						3b402586f8
					
				
					 1 changed files with 3 additions and 0 deletions
				
			
		|  | @ -15,6 +15,9 @@ module Kemal::Middleware | ||||||
|       return call_next(context) unless context.route_defined? |       return call_next(context) unless context.route_defined? | ||||||
|       call_block_for_path_type("ALL", context.request.path, :before, context) |       call_block_for_path_type("ALL", context.request.path, :before, context) | ||||||
|       call_block_for_path_type(context.request.override_method, context.request.path, :before, context) |       call_block_for_path_type(context.request.override_method, context.request.path, :before, context) | ||||||
|  |       if Kemal.config.error_handlers.has_key?(context.response.status_code) | ||||||
|  |         raise Kemal::Exceptions::CustomException.new(context) | ||||||
|  |       end | ||||||
|       call_next(context) |       call_next(context) | ||||||
|       call_block_for_path_type(context.request.override_method, context.request.path, :after, context) |       call_block_for_path_type(context.request.override_method, context.request.path, :after, context) | ||||||
|       call_block_for_path_type("ALL", context.request.path, :after, context) |       call_block_for_path_type("ALL", context.request.path, :after, context) | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue