X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=blobdiff_plain;f=E2Manager%2Fe2managererrors%2Fwrong_state_error.go;h=aadbc52ab31b089c806be21adcc0245aacc65167;hb=HEAD;hp=4c53b2e2756ca172a5a6a92104d137dcdd9d932e;hpb=b0f79cbf6bd94b81743e4109a4ae505b81263f48;p=ric-plt%2Fe2mgr.git diff --git a/E2Manager/e2managererrors/wrong_state_error.go b/E2Manager/e2managererrors/wrong_state_error.go index 4c53b2e..aadbc52 100644 --- a/E2Manager/e2managererrors/wrong_state_error.go +++ b/E2Manager/e2managererrors/wrong_state_error.go @@ -13,25 +13,28 @@ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. -// + +// This source code is part of the near-RT RIC (RAN Intelligent Controller) +// platform project (RICP). + package e2managererrors import "fmt" type WrongStateError struct { - Err BaseError + *BaseError } -func NewWrongStateError(state string) *WrongStateError { +func NewWrongStateError(activityName string, state string) *WrongStateError { return &WrongStateError{ - BaseError{ + &BaseError{ Code: 403, - Message: fmt.Sprintf("The RAN state <%s> isn’t in the appropriate state.", state) , + Message: fmt.Sprintf("Activity %s rejected. RAN current state %s does not allow its execution ", activityName, state) , }, } } func (e *WrongStateError) Error() string { - return e.Err.Message + return e.Message }