code: func restGetDeviceByServiceName(w http.ResponseWriter, r *http.Request) {
  	vars := mux.Vars(r)
  	sn, err := url.QueryUnescape(vars[SERVICENAME])
  	if err != nil {
  		LoggingClient.Error(err.Error())
  		http.Error(w, err.Error(), http.StatusServiceUnavailable)
  		return
  	}
  
  	// Check if the device service exists
  	ds, err := dbClient.GetDeviceServiceByName(sn)
  	if err != nil {
  		if err == db.ErrNotFound {
  			http.Error(w, err.Error(), http.StatusNotFound)
  		} else {
  			http.Error(w, err.Error(), http.StatusServiceUnavailable)
  		}
  		LoggingClient.Error(err.Error())
  		return
  	}
  
  	// Find devices by service ID now that you have the Service object (and therefor the ID)
  	res, err := dbClient.GetDevicesByServiceId(ds.Id)
  	if err != nil {
  		http.Error(w, err.Error(), http.StatusServiceUnavailable)
  		LoggingClient.Error(err.Error())
  		return
  	}
  
  	w.Header().Set("Content-Type", "application/json")
  	json.NewEncoder(w).Encode(res)
  }
docs: // If the result array is empty, don't return http.NotFound, just return empty array