From 496a7b542f07ac452b27acb8d3171a46096dd3ba Mon Sep 17 00:00:00 2001 From: Thomas Miller Date: Fri, 1 Dec 2023 09:54:42 +1000 Subject: [PATCH] Adds new NotFound error to cloud domain. We need a new error that encapsulates a cloud that cannot be found. This introduces a new ConstError to fulfil this. --- domain/cloud/errors/errors.go | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 domain/cloud/errors/errors.go diff --git a/domain/cloud/errors/errors.go b/domain/cloud/errors/errors.go new file mode 100644 index 00000000000..b36f970fc55 --- /dev/null +++ b/domain/cloud/errors/errors.go @@ -0,0 +1,14 @@ +// Copyright 2023 Canonical Ltd. +// Licensed under the AGPLv3, see LICENCE file for details. + +package errors + +import ( + "github.com/juju/errors" +) + +const ( + // NotFound describes an error that occurs when the cloud being operated on + // does not exist. + NotFound = errors.ConstError("cloud not found") +)