{"record":{"id":"32fa10594fd84cf5","repo":"hashicorp/vagrant","slug":"no-results-found-for-query","errorCode":null,"errorMessage":"No results found for `%{query}`","messagePattern":"No results found for `%(.+?)`","errorType":"console","errorClass":null,"httpStatus":null,"severity":"info","filePath":"plugins/commands/cloud/search.rb","lineNumber":88,"sourceCode":"        #\n        # @param [String] query Search query string\n        # @param [Hash] options\n        # @option options [String] :provider Filter by provider\n        # @option options [String] :sort Field to sort results\n        # @option options [Integer] :limit Number of results to display\n        # @option options [Integer] :page Page of results to display\n        # @param [String] access_token User access token\n        # @return [Integer]\n        def search(query, access_token, options={})\n          account = VagrantCloud::Account.new(\n            custom_server: api_server_url,\n            access_token: access_token\n          )\n          params = {query: query}.merge(options.slice(:architecture, :provider, :sort, :order, :limit, :page))\n          result = account.searcher.search(**params)\n\n          if result.boxes.empty?\n            @env.ui.warn(I18n.t(\"cloud_command.search.no_results\", query: query))\n            return 0\n          end\n\n          format_search_results(result.boxes, options[:short], options[:json], @env)\n          0\n        rescue VagrantCloud::Error => e\n          @env.ui.error(I18n.t(\"cloud_command.errors.search.fail\"))\n          @env.ui.error(e.message)\n          1\n        end\n      end\n    end\n  end\nend\n","sourceCodeStart":70,"sourceCodeEnd":103,"githubUrl":"https://github.com/hashicorp/vagrant/blob/35f3160f4ad6edc3a9f3aa9570adfc1a4d73aaa5/plugins/commands/cloud/search.rb#L70-L103","documentation":"Printed by `vagrant cloud search` when the query sent to the Vagrant Cloud API returns an empty box collection (result.boxes.empty?). It is the normal empty-outcome path: the command warns, returns exit code 0, and only a raised VagrantCloud::Error (auth, network, or API failure) produces the error output and exit code 1.","triggerScenarios":"Running `vagrant cloud search -q <term>` (or with --provider/--architecture/--sort/--order/--limit/--page filters) where VagrantCloud::Account#searcher.search returns zero boxes: a misspelled term, a filter combination no box matches (e.g. an x86-only box searched with --architecture arm64), or a --page value past the last result page.","commonSituations":"Typos in box or organization names; narrowing filters that exclude everything; paginating beyond the end of results; searching for a box that was recently deleted or made private on Vagrant Cloud.","solutions":["Fix the spelling and search the organization prefix first (e.g. `vagrant cloud search ubuntu/`)","Drop narrowing filters (--provider, --architecture) or raise --limit to widen the match","Retry with --page 1, since pages beyond the end return zero boxes","Confirm the box exists with `vagrant cloud box info org/name` or the Vagrant Cloud web UI","If you instead get error output and exit code 1, verify credentials with `vagrant cloud auth whoami`"],"exampleFix":"# before\nvagrant cloud search -q ubnutu --provider virtualbox\n# after\nvagrant cloud search -q ubuntu --provider virtualbox","handlingStrategy":"fallback","validationCode":"# Preflight for a known box name before searching broadly\nvagrant cloud box info org/name >/dev/null 2>&1 || echo \"no such box on Vagrant Cloud\"","typeGuard":null,"tryCatchPattern":"# Library users: the empty result is not an exception; only API failures raise\nbegin\n  result = account.searcher.search(query: q)\n  next if result.boxes.empty? # normal outcome\nrescue VagrantCloud::Error => e\n  warn e.message\nend","preventionTips":["Search the org prefix first, then narrow with --provider/--architecture","Use --json and inspect the boxes array when scripting","Treat exit code 0 with this warning as a successful empty query, not a failure"],"tags":["vagrant","cloud","search","no-results"],"backgroundTag":"empty-search-results","analyzedSha":"35f3160f4ad6edc3a9f3aa9570adfc1a4d73aaa5","analyzedAt":"2026-08-21T13:34:32.514Z","schemaVersion":2},"datasetVersion":"2026-08-21T18:17:14.833Z"}