code: func createTaskResponse(task *apitask.Task, found bool, resourceID string, state dockerstate.TaskEngineState) ([]byte, int) {
  	var responseJSON []byte
  	status := http.StatusOK
  	if found {
  		containerMap, _ := state.ContainerMapByArn(task.Arn)
  		responseJSON, _ = json.Marshal(NewTaskResponse(task, containerMap))
  	} else {
  		seelog.Warn("Could not find requested resource: " + resourceID)
  		responseJSON, _ = json.Marshal(&TaskResponse{})
  		status = http.StatusNotFound
  	}
  	return responseJSON, status
  }
docs: // createTaskResponse creates JSON response and sets the http status code for the task queried.