# Improvement
* adds catch for undecodeable proxied content
This commit is contained in:
		
							parent
							
								
									86698bd289
								
							
						
					
					
						commit
						a3a616dffe
					
				@ -50,7 +50,10 @@ class BaseClientProxyView(View):
 | 
			
		||||
        )
 | 
			
		||||
        content = response.content
 | 
			
		||||
        if isinstance(content, bytes):
 | 
			
		||||
            content = content.decode("utf-8")
 | 
			
		||||
            try:
 | 
			
		||||
                content = content.decode("utf-8")
 | 
			
		||||
            except UnicodeDecodeError:
 | 
			
		||||
                content = f"Can not decode content of {url}"
 | 
			
		||||
        return content, response.status_code
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user