mirror of
				https://gitea.invidious.io/iv-org/shard-kemal.git
				synced 2024-08-15 00:53:36 +00:00 
			
		
		
		
	set response status code before creating exception template (#468)
This commit is contained in:
		
							parent
							
								
									ced34b7651
								
							
						
					
					
						commit
						b8ec6ee328
					
				
					 1 changed files with 2 additions and 1 deletions
				
			
		|  | @ -22,13 +22,14 @@ def render_404 | |||
| end | ||||
| 
 | ||||
| def render_500(context, exception, verbosity) | ||||
|   context.response.status_code = 500 | ||||
| 
 | ||||
|   template = if verbosity | ||||
|                Kemal::ExceptionPage.for_runtime_exception(context, exception).to_s | ||||
|              else | ||||
|                Kemal::ExceptionPage.for_production_exception | ||||
|              end | ||||
| 
 | ||||
|   context.response.status_code = 500 | ||||
|   context.response.print template | ||||
|   context | ||||
| end | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue