Make query return 404 if no return values can be found