diff --git a/helper/resource/error.go b/helper/resource/error.go new file mode 100644 index 0000000000..58bd127ad3 --- /dev/null +++ b/helper/resource/error.go @@ -0,0 +1,21 @@ +package resource + +type NotFoundError struct { + LastError error + LastRequest interface{} + LastResponse interface{} + Message string + Retries int +} + +func (e *NotFoundError) Error() string { + if e.Message != "" { + return e.Message + } + + return "couldn't find resource" +} + +func NewNotFoundError(err string) *NotFoundError { + return &NotFoundError{Message: err} +}