mirror of
				https://github.com/nsnail/Ocelot.git
				synced 2025-11-01 04:35:28 +08:00 
			
		
		
		
	[WIP] use HttpContext.RequestAborted to support cancel a request (#902)
* use HttpContext.RequestAborted to support cancel a request * register context.HttpContext.RequestAborted.ThrowIfCancellationRequested() in ExceptionHandlerMiddleware * add LangVersion * add default number to OcelotErrorCode fix unit test * revert back to one line
This commit is contained in:
		 liweihan
					liweihan
				
			
				
					committed by
					
						 Thiago Loureiro
						Thiago Loureiro
					
				
			
			
				
	
			
			
			 Thiago Loureiro
						Thiago Loureiro
					
				
			
						parent
						
							fe3cf44c45
						
					
				
				
					commit
					4476f8273e
				
			| @@ -30,6 +30,14 @@ | ||||
|             error.ShouldBeOfType<UnableToCompleteRequestError>(); | ||||
|         } | ||||
|  | ||||
|         [Fact] | ||||
|         public void should_return_request_canceled() | ||||
|         { | ||||
|             var error = _mapper.Map(new OperationCanceledException()); | ||||
|  | ||||
|             error.ShouldBeOfType<RequestCanceledError>(); | ||||
|         } | ||||
|  | ||||
|         [Fact] | ||||
|         public void should_return_error_from_mapper() | ||||
|         { | ||||
|   | ||||
		Reference in New Issue
	
	Block a user