private async Task <DataResult <T> > DeserializeResponse <T>(HttpResponseMessage response) { if (!response.IsSuccessStatusCode) { return(DataResult <T> .Failed(describer.RequestError(response.StatusCode.ToString(), response.Content.ToString()))); } var jsonString = await response.Content.ReadAsStringAsync(); if (jsonString.Contains("error")) { return(DataResult <T> .Failed(describer.RequestError(response.StatusCode.ToString(), jsonString))); } var data = JsonConvert.DeserializeObject <T>(jsonString); return(DataResult <T> .Success(data)); }