public override async Task PreprocessResponse(HttpResponseMessage response) { if (!response.IsSuccessStatusCode) { var message = await response.Content.ReadAsStringAsync(); var exceptionModel = BackendJsonConverter.Deserialize <BackendException>(message); throw new AuctionHubException(exceptionModel.Messages, exceptionModel.StatusCode); } }
protected T Deserialize <T>(string json) { return(BackendJsonConverter.Deserialize <T>(json)); }