mirror of
				https://github.com/nsnail/Ocelot.git
				synced 2025-11-04 15:50:49 +08:00 
			
		
		
		
	Fix: errors when using rate limiting (#811)
* Fix: errors when using rate limiting Add: QuotaExceededError class for requesting too much Add: QuotaExceededError error code Add: Add an error when limit is reached Reflact: Extract GetResponseMessage method for getting default or configured response message for requ * Fix: modify check_we_have_considered_all_errors_in_these_tests for adding a new OcelotErrorCode
This commit is contained in:
		
				
					committed by
					
						
						Thiago Loureiro
					
				
			
			
				
	
			
			
			
						parent
						
							799abf55c4
						
					
				
				
					commit
					e76a51ffc9
				
			@@ -125,7 +125,7 @@ namespace Ocelot.UnitTests.Responder
 | 
			
		||||
            // If this test fails then it's because the number of error codes has changed.
 | 
			
		||||
            // You should make the appropriate changes to the test cases here to ensure
 | 
			
		||||
            // they cover all the error codes, and then modify this assertion.
 | 
			
		||||
            Enum.GetNames(typeof(OcelotErrorCode)).Length.ShouldBe(36, "Looks like the number of error codes has changed. Do you need to modify ErrorsToHttpStatusCodeMapper?");
 | 
			
		||||
            Enum.GetNames(typeof(OcelotErrorCode)).Length.ShouldBe(37, "Looks like the number of error codes has changed. Do you need to modify ErrorsToHttpStatusCodeMapper?");
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        private void ShouldMapErrorToStatusCode(OcelotErrorCode errorCode, HttpStatusCode expectedHttpStatusCode)
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user