lib/berkshelf/errors.rb in berkshelf-1.4.0 vs lib/berkshelf/errors.rb in berkshelf-1.4.1

- old
+ new

@@ -150,6 +150,17 @@ class CookbookValidationFailure < BerkshelfError; status_code(124); end class ClientKeyFileNotFound < BerkshelfError; status_code(125); end class UploadFailure < BerkshelfError; end class FrozenCookbook < UploadFailure; status_code(126); end + class InvalidSiteShortnameError < BerkshelfError + status_code(127) + + def initialize(shortname) + @shortname = shortname + end + + def to_s + "Unknown site shortname: #{@shortname.inspect}. Supported shortnames are: #{SiteLocation::SHORTNAMES.keys.map(&:inspect).join(',')}" + end + end end