This commit is contained in:
2020-04-28 18:53:00 +00:00
parent c239ae57f4
commit 27a6edca44
2 changed files with 70 additions and 58 deletions

View File

@@ -150,6 +150,10 @@ namespace AyaNova.PlugIn.V8
HttpResponseMessage response = await client.SendAsync(requestMessage);
var responseAsString = await response.Content.ReadAsStringAsync();
if (!response.IsSuccessStatusCode)
{
throw new Exception(responseAsString + "\n" + response.ReasonPhrase);
}
return new ApiResponse() { HttpResponse = response, ObjectResponse = Parse(responseAsString) };
}