1
0
mirror of https://github.com/JKorf/CryptoExchange.Net.git synced 2026-08-11 16:32:57 +00:00

Seperated validate json call, error parsing now receive JToken

This commit is contained in:
JKorf
2018-12-03 16:11:06 +01:00
parent b4d45b4194
commit 8a4e8403d2
3 changed files with 62 additions and 28 deletions
@@ -97,10 +97,9 @@ namespace CryptoExchange.Net.UnitTests.TestImplementations
public ParseErrorTestRestClient() { }
public ParseErrorTestRestClient(ClientOptions exchangeOptions) : base(exchangeOptions) { }
protected override Error ParseErrorResponse(string error)
protected override Error ParseErrorResponse(JToken error)
{
var data = JToken.Parse(error);
return new ServerError((int)data["errorCode"], (string)data["errorMessage"]);
return new ServerError((int)error["errorCode"], (string)error["errorMessage"]);
}
}
}