public HttpResponseMessage GetAll() { try { ItemsResponse <ErrorLog> resp = new ItemsResponse <ErrorLog>(); resp.Items = _errorService.GetAll(); return(Request.CreateResponse(HttpStatusCode.OK, resp)); } catch (Exception ex) { _errorService.LogError(ex); return(Request.CreateErrorResponse(HttpStatusCode.BadRequest, ex)); } }