exceptions.FastAPIChameleonGenericException

Signals an arbitrary error response from inside a decorated view.

Usage

Source

exceptions.FastAPIChameleonGenericException(
    template_file, status_code, message=None, template_data=None
)

Raised by generic_error() and caught by the template() decorator, which renders template_file with the chosen status_code. You normally raise it indirectly via generic_error() rather than constructing it yourself.