Fix undefined method error in sidekiq (#9807)
* Fix undefined method error in sidekiq Body can be not nil but still be empty, which causes a `NoMethodError: undefined method `[]' for nil:NilClass` further in the code. This checks for an empty body to avoid the issue. * Fix codeclimate issue
This commit is contained in:
		
				
					committed by
					
						
						Eugen Rochko
					
				
			
			
				
	
			
			
			
						parent
						
							b4e6384aea
						
					
				
				
					commit
					5c5e14c816
				
			
							
								
								
									
										7
									
								
								spec/fixtures/requests/oembed_json_empty.html
									
									
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										7
									
								
								spec/fixtures/requests/oembed_json_empty.html
									
									
									
									
										vendored
									
									
										Normal file
									
								
							@@ -0,0 +1,7 @@
 | 
			
		||||
<!DOCTYPE html>
 | 
			
		||||
<html>
 | 
			
		||||
  <head>
 | 
			
		||||
    <link href='https://host.test/empty_provider.json' rel='alternate' type='application/json+oembed'>
 | 
			
		||||
  </head>
 | 
			
		||||
  <body></body>
 | 
			
		||||
</html>
 | 
			
		||||
		Reference in New Issue
	
	Block a user