X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=blobdiff_plain;f=RSM%2Frsmerrors%2Frequest_validation_error.go;fp=RSM%2Frsmerrors%2Frequest_validation_error.go;h=836e7952dc870ee6dc891f4a16f8c9ec7a8e37f5;hb=7b80668df78103cebafdfb7caa0070dc92ed3779;hp=0000000000000000000000000000000000000000;hpb=66db8f159a8034a65cc02f3ff4701cdfb908b496;p=ric-plt%2Fresource-status-manager.git diff --git a/RSM/rsmerrors/request_validation_error.go b/RSM/rsmerrors/request_validation_error.go new file mode 100644 index 0000000..836e795 --- /dev/null +++ b/RSM/rsmerrors/request_validation_error.go @@ -0,0 +1,35 @@ +// +// Copyright 2019 AT&T Intellectual Property +// Copyright 2019 Nokia +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// 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. +// + +package rsmerrors + +type RequestValidationError struct { + *BaseError +} + +func NewRequestValidationError() *RequestValidationError { + return &RequestValidationError{ + &BaseError{ + Code: 402, + Message: "Validation error", + }, + } +} + +func (e *RequestValidationError) Error() string { + return e.Message +}