Remove json.net dependency to STJson
This commit is contained in:
@@ -5,6 +5,7 @@ using System.IO;
|
|||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Net;
|
using System.Net;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
|
using System.Text.Json.Nodes;
|
||||||
using System.Text.RegularExpressions;
|
using System.Text.RegularExpressions;
|
||||||
using System.Threading;
|
using System.Threading;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
@@ -16,7 +17,6 @@ using Microsoft.Kiota.Http.HttpClientLibrary.Middleware;
|
|||||||
using Microsoft.Kiota.Http.HttpClientLibrary.Middleware.Options;
|
using Microsoft.Kiota.Http.HttpClientLibrary.Middleware.Options;
|
||||||
using MimeKit;
|
using MimeKit;
|
||||||
using MoreLinq.Extensions;
|
using MoreLinq.Extensions;
|
||||||
using Newtonsoft.Json.Linq;
|
|
||||||
using Serilog;
|
using Serilog;
|
||||||
using Wino.Core.Domain.Entities;
|
using Wino.Core.Domain.Entities;
|
||||||
using Wino.Core.Domain.Enums;
|
using Wino.Core.Domain.Enums;
|
||||||
@@ -801,7 +801,7 @@ namespace Wino.Core.Synchronizers
|
|||||||
if (!httpResponseMessage.IsSuccessStatusCode)
|
if (!httpResponseMessage.IsSuccessStatusCode)
|
||||||
{
|
{
|
||||||
var content = await httpResponseMessage.Content.ReadAsStringAsync();
|
var content = await httpResponseMessage.Content.ReadAsStringAsync();
|
||||||
var errorJson = JObject.Parse(content);
|
var errorJson = JsonObject.Parse(content);
|
||||||
var errorString = $"({httpResponseMessage.StatusCode}) {errorJson["error"]["code"]} - {errorJson["error"]["message"]}";
|
var errorString = $"({httpResponseMessage.StatusCode}) {errorJson["error"]["code"]} - {errorJson["error"]["message"]}";
|
||||||
|
|
||||||
exceptionBag.Add(errorString);
|
exceptionBag.Add(errorString);
|
||||||
|
|||||||
Reference in New Issue
Block a user