mirror of
				https://github.com/nsnail/Ocelot.git
				synced 2025-11-04 13:10:51 +08:00 
			
		
		
		
	Fix configuration error, throw error message (#522)
Fix configuration error, throw error message
This commit is contained in:
		
				
					committed by
					
						
						Tom Pallister
					
				
			
			
				
	
			
			
			
						parent
						
							0f68f18060
						
					
				
				
					commit
					46132b6fa8
				
			@@ -118,6 +118,11 @@
 | 
			
		||||
            // now create the config
 | 
			
		||||
            var internalConfigCreator = builder.ApplicationServices.GetService<IInternalConfigurationCreator>();
 | 
			
		||||
            var internalConfig = await internalConfigCreator.Create(fileConfig.Value);
 | 
			
		||||
           //Configuration error, throw error message
 | 
			
		||||
            if (internalConfig.IsError)
 | 
			
		||||
            {
 | 
			
		||||
                ThrowToStopOcelotStarting(internalConfig);
 | 
			
		||||
            }
 | 
			
		||||
 | 
			
		||||
            // now save it in memory
 | 
			
		||||
            var internalConfigRepo = builder.ApplicationServices.GetService<IInternalConfigurationRepository>();
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user