From 47962dff37cba6344ffbb71715347e357dff735d Mon Sep 17 00:00:00 2001 From: Paul Hinze Date: Fri, 24 Jun 2022 16:30:51 -0500 Subject: [PATCH] Scope down rescue on BoxCollection.find After https://github.com/hashicorp/vagrant-plugin-sdk/pull/175 is merged it will properly return a NotFound so we can rescue that specifically and let any unexpected errors propagate. --- plugins/commands/serve/client/box_collection.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/commands/serve/client/box_collection.rb b/plugins/commands/serve/client/box_collection.rb index 2226ea8d8..6b1d971af 100644 --- a/plugins/commands/serve/client/box_collection.rb +++ b/plugins/commands/serve/client/box_collection.rb @@ -52,7 +52,7 @@ module VagrantPlugins res = client.find(SDK::BoxCollection::FindRequest.new( name: name, version: version, providers: Array(providers) )) - rescue + rescue GRPC::NotFound logger.debug("box not found!") return nil end