public override void OnException(HttpActionExecutedContext context) { var loggingHelper = new LoggingHelper(); loggingHelper.TraceError(context.Exception); ErrorLog.GetDefault(HttpContext.Current).Log(new Error(context.Exception)); context.Response = context.Request.CreateResponse( HttpStatusCode.InternalServerError, new ErrorDto { Code = 0, Error = "Oops, something went wrong!" } ); }