mirror of
https://github.com/nsnail/Ocelot.git
synced 2025-04-22 06:42:50 +08:00
#492 minor changes
This commit is contained in:
parent
f0667471dd
commit
90c5676887
@ -22,9 +22,9 @@ namespace Ocelot.Requester.Middleware
|
|||||||
{
|
{
|
||||||
var response = await _requester.GetResponse(context);
|
var response = await _requester.GetResponse(context);
|
||||||
|
|
||||||
if (response.Data != null && response.Data.StatusCode == System.Net.HttpStatusCode.InternalServerError)
|
if (response.Data?.StatusCode == System.Net.HttpStatusCode.InternalServerError)
|
||||||
{
|
{
|
||||||
Logger.LogError("500 (Internal Server Error) status code, request uri: " + response.Data.RequestMessage?.RequestUri, null);
|
Logger.LogError($"{(int)response.Data.StatusCode} ({response.Data.ReasonPhrase}) status code, request uri: {response.Data.RequestMessage?.RequestUri}", null);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (response.IsError)
|
if (response.IsError)
|
||||||
|
@ -117,7 +117,8 @@ namespace Ocelot.UnitTests.Requester
|
|||||||
x => x.LogError(
|
x => x.LogError(
|
||||||
It.IsAny<string>(),
|
It.IsAny<string>(),
|
||||||
It.IsAny<Exception>()
|
It.IsAny<Exception>()
|
||||||
));
|
),
|
||||||
|
Times.Once);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user