swimlane.exceptions module

Custom exceptions and errors

exception swimlane.exceptions.InvalidSwimlaneBuildVersion(swimlane, min_version, max_version)[source]

Bases: _InvalidSwimlaneVersion

Raised when method connected to Swimlane with build version outside a required range

exception swimlane.exceptions.InvalidSwimlaneProductVersion(swimlane, min_version, max_version)[source]

Bases: _InvalidSwimlaneVersion

Raised when method connected to Swimlane with product version outside a required range

exception swimlane.exceptions.SwimlaneException[source]

Bases: Exception

Base exception for Swimlane errors

exception swimlane.exceptions.SwimlaneHTTP400Error(http_error)[source]

Bases: SwimlaneException, HTTPError

Exception raised when receiving a 400 response with additional context

code

Swimlane error code

Type:

int

name

Human-readable Swimlane error name

Type:

str

argument

Optional argument included with error or None

Type:

str

http_error

Source requests.HTTPError caught and used to generate this exception

Type:

HTTPError

codes = {-1: 'Unknown', 1000: 'PasswordExpired', 1001: 'DuplicateUserName', 1002: 'InvalidUserNameOrPassword', 1003: 'ConfirmPasswordDoesNotMatch', 1004: 'PasswordDoesNotMeetComplexityRequirements', 1005: 'PasswordResetRequired', 1006: 'NewPasswordCannotMatchCurrent', 1007: 'InvalidUser', 1051: 'DuplicateGroupName', 1061: 'DuplicateRoleName', 2000: 'DuplicateFieldName', 2001: 'FieldNameEmpty', 2002: 'InvalidApplicationExportFile', 2003: 'ApplicationNotFound', 2004: 'InvalidCalculation', 2005: 'DuplicateApplicationName', 2006: 'DuplicateAppletName', 2007: 'DuplicateAppletAcronym', 2008: 'DuplicateApplicationAcronym', 2011: 'SectionNameTooLong', 3000: 'DuplicateFieldValue', 3001: 'InvalidDateField', 3002: 'RecordNotFound', 3003: 'FieldNotFound', 3006: 'MaxAttachmentSize', 4000: 'BadStatsGroup', 4001: 'BadFilter', 5000: 'AppLimitExceeded', 5001: 'UserLimitExceeded', 5002: 'NewServerInstall', 5003: 'UnableToConnectToActiveDirectory', 5004: 'UnableToRetrieveStoredValue', 5005: 'UnableToConnectToMongoDb', 5006: 'UnableToConnectToSmtp', 5007: 'SwimlaneAlreadyInitialized', 5008: 'ModelValidationError', 5009: 'UpgradeInProcess', 5010: 'RequiredFieldMissing', 5011: 'UnableToRetrieveEncryptionKey', 5012: 'PathNotFound', 5013: 'WrongType', 5014: 'ModificationError', 5015: 'DatabaseError', 5016: 'NetworkError', 5017: 'InvalidOnThisOS', 6000: 'ConnectionDataNotProvided', 7000: 'RegexNotDefined', 7001: 'AssetNotFound', 9000: 'BadThreatIntelConnector', 9001: 'NoThreatIntel', 9002: 'ThreatIntelTypeNotSupportedByThisProvider', 10000: 'DuplicateTaskName', 10001: 'TaskNotFound', 17001: 'DuplicateAssetName', 19001: 'HangfireError'}
exception swimlane.exceptions.UnknownField(app, field_name, field_pool)[source]

Bases: SwimlaneException, KeyError

Raised anytime access is attempted to a field that does not exist on an App or Record

app

App with the unknown field requested

Type:

App

field_name

Name of the field that was requested

Type:

str

similar_field_names

List of strings of fields on app that are potentially similar to field_name

Type:

list(str)

exception swimlane.exceptions.ValidationError(record, failure)[source]

Bases: SwimlaneException, ValueError

Raised when record’s field data is invalid

record

Record in context of validation failure

Type:

Record

failure

Reason for record failure

Type:

str