public async Task <ActionResult <TodoItem> > GetTodoItem(long id) { if (id == 0) { return(BadRequest("Id must not be 0!")); } try { var todoItem = await _todoItemsService.GetById(id); if (todoItem == null) { return(NotFound("Todo item not found!")); } return(Ok(todoItem)); } catch (Exception ex) { return(StatusCode(599, ex.Message)); } }