mirror of
https://github.com/nsnail/Ocelot.git
synced 2025-06-19 01:58:15 +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:

committed by
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