only use 404 if resource is not found, not a query result