# Path: armada/common/i18n.py



import falcon
from oslo_config import cfg
from oslo_log import log as logging
from armada.common.i18n import _
            self.message = self.message % kwargs
        except Exception:
            pass
        super(ArmadaBaseException, self).__init__(self.message)


class ArmadaAPIException(falcon.HTTPError):
    '''Base class for Armada API Exceptions.'''

    status = falcon.HTTP_500
    message = "unknown error"
    title = "Internal Server Error"

    def __init__(self, message=None, **kwargs):
        self.message = message or self.message
        super(ArmadaAPIException, self).__init__(
            self.status, self.title, self.message, **kwargs
        )


class ActionForbidden(ArmadaAPIException):
    '''
    Exception thrown when an action is forbidden.

    **Troubleshoot:**
    *Coming Soon*
    '''

    status = falcon.HTTP_403
    message = _("Insufficient privilege to perform action.")

# Path: armada/common/i18n.py



# Path: armada/exceptions/base_exception.py
import falcon
from oslo_config import cfg
from oslo_log import log as logging
from armada.common.i18n import _

            self.message = self.message % kwargs
        except Exception:
            pass
        super(ArmadaBaseException, self).__init__(self.message)


class ArmadaAPIException(falcon.HTTPError):
    '''Base class for Armada API Exceptions.'''

    status = falcon.HTTP_500
    message = "unknown error"
    title = "Internal Server Error"

    def __init__(self, message=None, **kwargs):
        self.message = message or self.message
        super(ArmadaAPIException, self).__init__(
            self.status, self.title, self.message, **kwargs
        )


class ActionForbidden(ArmadaAPIException):
    '''
    Exception thrown when an action is forbidden.

    **Troubleshoot:**
    *Coming Soon*
    '''

    status = falcon.HTTP_403
    message = _("Insufficient privilege to perform action.")

    title = _("Action Forbidden")