amcrn 10ff1cf745 Remove Duplicate ClientExceptions and Merge
horizon handles troveclient.ClientException as a recoverable error,
with troveclient defined via "from troveclient import exceptions
as troveclient". this patch imports oslo's apiclient exceptions
in troveclient/exceptions.py to ensure all ClientExceptions are
considered recoverable. also removes unused exceptions that were
unnecessarily ported from the compat version of the client. this
fix is necessary to avoid seeing the generic error message of
"Error: There was an error submitting the form. Please try again."
in horizon vs. the explicit error message.

Change-Id: I94c8ec0289821ccd365d6689488a3e25877c1560
Closes-Bug: #1292033
2014-04-25 10:56:37 -07:00

37 lines
1.1 KiB
Python

# Copyright 2011 OpenStack Foundation
# Copyright 2013 Rackspace Hosting
# Copyright 2013 Hewlett-Packard Development Company, L.P.
# 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. 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.
"""
Exception definitions
"""
#flake8: noqa
# alias exceptions from apiclient for users of this module
from troveclient.openstack.common.apiclient.exceptions import *
class NoTokenLookupException(Exception):
"""This form of authentication does not support looking up
endpoints from an existing token.
"""
pass
class ResponseFormatError(Exception):
"""Could not parse the response format."""
pass