From 0d49e3cc916c48915fae7efd590c87c2c5422cc5 Mon Sep 17 00:00:00 2001 From: santhoshatdell Date: Tue, 10 Sep 2024 16:44:29 +0000 Subject: [PATCH] Add metro error --- gopowerstore_types.go | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/gopowerstore_types.go b/gopowerstore_types.go index f935e55..33ecc0c 100644 --- a/gopowerstore_types.go +++ b/gopowerstore_types.go @@ -1,6 +1,6 @@ /* * - * Copyright © 2020-2023 Dell Inc. or its subsidiaries. All Rights Reserved. + * Copyright © 2020-2024 Dell Inc. or its subsidiaries. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -129,6 +129,11 @@ func (err *APIError) UnableToFailoverFromDestination() bool { return err.StatusCode == http.StatusBadRequest } +// ReplicationSessionAlreadyCreated returns true if API error indicate that replication session has already been created +func (err *APIError) ReplicationSessionAlreadyCreated() bool { + return err.StatusCode == http.StatusBadRequest +} + // NewNotFoundError returns new VolumeIsNotExistError func NewNotFoundError() APIError { return notFoundError()