Source code for q2_sdk.core.exceptions

[docs] class ConfigurationError(Exception): """Settings file misconfigured"""
[docs] class MessageBusConfigurationError(ConfigurationError): """Message bus related exception"""
[docs] class CorruptMessageError(Exception): """Bus message was corrupted"""
[docs] class CoreNotConfiguredError(ConfigurationError): """configuration.settings.CORE must be set to a subclass of q2_sdk.models.cores.BaseCore"""
[docs] class EntryPointRunnerException(Exception): """Nonspecific Entrypoint failure"""
[docs] class NonInteractiveError(Exception): """Cannot call this command during a non-interactive run"""
[docs] class GridSizeError(Exception): """Grid can only be L, M, S, or None"""
[docs] class NoConfigError(Exception): """Missing Default Configuration File"""
[docs] class RowTooLargeError(Exception): """Only allowed to provide rows of 4 fields or less"""
[docs] class VaultError(Exception): """Unable to communicate effectively with Vault"""
[docs] class MockDataError(Exception): """Mock data does not have a realistic shape"""
[docs] class MockTestError(Exception): """This object should be mocked for testing"""
[docs] class NoRootError(Exception): """Unable to find root of repo"""
[docs] class NotExecutableError(Exception): """This request is not allowed to be executed"""
[docs] class InstallStepError(Exception): """Install step misconfigured"""
[docs] class BlacklistedUrlError(Exception): """Outbound URL not in Settings Whitelist"""
[docs] class RunServerError(Exception): """Issue starting the Tornado server"""
[docs] class TectonError(Exception): """Tecton exception"""
[docs] class DatabaseDataError(Exception): """Database does not contain what you are looking for"""
[docs] class RunEnvironmentError(Exception): """Unable to do requested operation in this environment"""
[docs] class UnknownExtensionTypeError(Exception): """Unknown Extension Type"""
[docs] class InvalidReturnType(Exception): """Ajax target method must return a dictionary or TectonResponse."""
[docs] class DangerousCodeError(Exception): """This codepath must be opted into due to its power"""
[docs] class HqResponseError(Exception): """Hq Response returned with a failed message"""
[docs] class SystemDependencyError(Exception): """Missing system dependency"""
[docs] class TooDamnHighError(Exception): """This input is ridiculously large"""
[docs] class NoDevAccessToken(Exception): """DevAccessToken must be requested from q2developer.com"""
[docs] class DbObjectError(Exception): """DbObject operation did not complete"""
[docs] class InvalidExtensionNameError(Exception): """Extension name is not valid"""
[docs] class DevOnlyError(Exception): """This method can only be used in development"""
[docs] class BadParameterError(Exception): """One of the function's parameters is poorly constructed"""
[docs] class MoveGroupError(Exception): """Customer failed to move to new group""" CODE_MAPPING = { -1: "Unknown Error", -2: "Too many originating groups", -3: "User has pending transactions", -4: "Group/Zone mismatch", } def __init__(self, message): if isinstance(message, int): message = self.CODE_MAPPING.get(message, "Unknown Error Code") self.message = message super().__init__(self.message)
[docs] class Q2MsgTypeError(Exception): """Unexpected Q2Msg Type"""
[docs] class ImproperUseError(Exception): """This class or function was called incorrectly"""
[docs] class DatabaseDuplicateDataError(DatabaseDataError): """Was expecting only a single row"""
[docs] class DatabaseMissingDataError(DatabaseDataError): """No rows returned"""