/// <summary> /// Exceptions the response. /// </summary> /// <param name="httpResponseMessage">The HTTP response message.</param> /// <returns></returns> public static async Task <ExceptionResponse> ExceptionResponse(this HttpResponseMessage httpResponseMessage) { string responseContent = await httpResponseMessage.Content.ReadAsStringAsync(); ExceptionResponse exceptionResponse = JsonConvert.DeserializeObject <ExceptionResponse>(responseContent); return(exceptionResponse); }
/// <summary> /// When overridden in a derived class, logs the exception synchronously. /// </summary> /// <param name="exception">The exception as a string</param> public void Log(ExceptionResponse exception) { _logger.Log(LogLevel.Error, exception); }