1 # Copyright (c) 2019 AT&T Intellectual Property.
2 # Copyright (c) 2018-2019 Nokia.
4 # Licensed under the Apache License, Version 2.0 (the "License");
5 # you may not use this file except in compliance with the License.
6 # You may obtain a copy of the License at
8 # http://www.apache.org/licenses/LICENSE-2.0
10 # Unless required by applicable law or agreed to in writing, software
11 # distributed under the License is distributed on an "AS IS" BASIS,
12 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 # See the License for the specific language governing permissions and
14 # limitations under the License.
17 # This source code is part of the near-RT RIC (RAN Intelligent Controller)
18 # platform project (RICP).
22 "Exceptions raised by the Shared Data Layer (SDL)."
25 class SdlTypeError(TypeError):
27 Exception for passing a function argument of wrong type.
28 It is likely that the same request will fail repeatedly. It is advised to investigate the exact
29 reason for the failure from the logs.
34 class SdlException(Exception):
35 """Base exception class for Shared Data Layer (SDL) exceptions."""
39 class NotConnected(SdlException):
41 Exception for SDL not being connected to the database backend.
42 SDL is not connected to the backend data storage and therefore could not deliver the request
43 to the backend data storage. Data in the backend data storage has not been altered.
44 Client is advised to try the operation again later.
49 class BackendError(SdlException):
51 Exception for request processing failure in SDL database backend.
52 In case of a write type request, data in the backend data storage may or may not have been
53 altered. Client is advised to try the operation again later.
58 class RejectedByBackend(SdlException):
60 Exception for SDL database backend rejecting the request.
61 Backend data storage rejected the request. In case of a write type request, data in the backend
62 data storage may or may not have been altered. It is likely that the same request will fail
63 repeatedly. It is advised to investigate the exact reason for the failure from the logs.