public ActionResult Post([FromBody] ToDoTaskModel request) { try { _toDoService.AddTask(request); return(Ok("Success")); } catch (ToDoTaskException ex) { Debug.WriteLine($"TODO:{ex.Message}"); return(BadRequest(ex.Message)); } catch (Exception ex) { Debug.WriteLine($"TODO:{ex.Message}"); return(BadRequest(ex.Message)); } }