oslo.middleware/oslo_middleware/exceptions.py
Takashi Kajinami 67a0a3906c Make ConfigInvalid generic
The ConfigInvalid class is now used not only by basicauth middleware
but also by healthcheck middleware. Move it out from basicauth
middleware to a common place.

This change also address a few follow-up items of [1].

[1] 01cd608104

Change-Id: I1865cbfe6ff22ffb7db57cf685e340de4a3568d4
2024-07-04 11:49:52 +09:00

18 lines
720 B
Python

#
# 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.
class ConfigInvalid(Exception):
def __init__(self, error_msg):
super().__init__(
'Invalid configuration. %(error_msg)s')