我Exception
从一个 Web 应用程序发送并在另一个应用程序中获取它。HttpRequestException
在这种情况下如何获取值?
发送自:
context.Response = new HttpResponseMessage(apiError.StatusCode)
{
Content = new ObjectContent<ApiError>(apiError,
new JsonMediaTypeFormatter(), @"application/json")
};
return context;
进入另一个:
catch (HttpRequestException e)
{
this.logger.LogError(
string.Format("Ошибка запроса {0}", requestUri.AbsoluteUri),
LogCategoryRepository.ApiCashdesk,
e);
throw;
}