public IHttpActionResult PostNewProj(ProjectViewModel proj) { try { if (!ModelState.IsValid) { return(BadRequest("Invalid data.")); } projHandler.AddProject(proj); return(Ok()); } catch (CustomException ex) { return(BadRequest(ex.ExceptionMsg)); } catch (Exception ex) { return(InternalServerError(ex)); } }