feat(esppOrderManager): отладка
This commit is contained in:
@@ -34,8 +34,8 @@ namespace PARR.EsppApi
|
||||
var query = $"<ROOT operation=\"SaveTask\" returnFormat=\"json\">{{" +
|
||||
$"\"recordid\":\"{recordId}\"," +
|
||||
$"\"status\":\"{newStatusStr}\"," +
|
||||
$"\"assignee\":\"{esppOrderSettings.AccountName}\"" +
|
||||
$"\"resolution\":\"{resultMsg}\"," +
|
||||
$"\"assignee\":\"{esppOrderSettings.AccountName}\"," +
|
||||
$"\"resolution\":\"{resultMsg}\"" +
|
||||
$"}}</ROOT>";
|
||||
|
||||
var result = await esppHttpService.SendAsync<EsppResponse>(query);
|
||||
|
||||
@@ -14,4 +14,8 @@
|
||||
<PackageReference Include="Microsoft.Extensions.Logging.Abstractions" Version="7.0.0" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\PARR.Constants\PARR.Constants.csproj" />
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
||||
|
||||
@@ -30,6 +30,13 @@ namespace PARR.EsppApi
|
||||
|
||||
var responseString = await response.Content.ReadAsStringAsync();
|
||||
|
||||
if (responseString.Contains("ErrorCode") && responseString.Contains("Message"))
|
||||
{
|
||||
logger.LogError(new Exception(responseString), $"Ошибка при выполнении запроса в ЕСПП. Тело запроса: {query}");
|
||||
|
||||
return new EsppResultBase<T>(null, false, new Exception($"Espp error: {responseString}"));
|
||||
}
|
||||
|
||||
logger.LogDebug($"Получил данные, строка: {responseString}");
|
||||
|
||||
var obj = JsonSerializer.Deserialize<T>(responseString);
|
||||
|
||||
Reference in New Issue
Block a user