Errors¶
-
class
APIError
(r)[source]¶ The APIError Exception is a generic Exception for handling responses from the API that aren’t whats expected. The APIError Exception itself attempts to provide the developer with enough information around the response to ascertain what went wrong.
-
response
¶ This is the Response object that had caused the Exception to fire.
Type: request.Response
-
-
class
ConnectionError
(msg)[source]¶ A connection-error is thrown only for products like Tenable.sc or Nessus, where the application may be installed anywhere. This error is thrown if we are unable to complete the initial connection or gather the basic information about the application that is necessary.
-
class
ImpersonationError
(r)[source]¶ An ImpersonationError exists when there is an issue with user impersonation.
-
response
¶ This is the Response object that had caused the Exception to fire.
Type: request.Response
-
-
class
NotFoundError
(r)[source]¶ A NotFoundError Exception is thrown when the requested object either doesn’t exist, or cannot be retrieved. The HTTP response code generally associated to this Exception is 404.
-
response
¶ This is the Response object that had caused the Exception to fire.
Type: request.Response
-
-
class
PackageMissingError
(msg)[source]¶ In situations where an optional library is needed, this exception will be thrown if the optional library is needed, however is unavailable.
-
class
PasswordComplexityError
(r)[source]¶ PasswordComplexityError is thrown when attempting to change a password and the password complexity is insufficient.
-
response
¶ This is the Response object that had caused the Exception to fire.
Type: request.Response
-
-
class
RetryError
(r, attempts)[source]¶ A RetryError is thrown when too many retry attempts have been made.
-
response
¶ This is the Response object that had caused the Exception to fire.
Type: request.Response
-
-
class
ServerError
(r)[source]¶ A ServerError is thrown when the HTTP request cannot be completed due to a server-side issue. The HTTP response code generally associated to this Exception is 500.
-
response
¶ This is the Response object that had caused the Exception to fire.
Type: request.Response
-
-
class
TenableException
(msg)[source]¶ Base exception class that sets up logging and handles some basic scaffolding for all other exception classes. This exception should never be directly seen.
-
class
TioExportsError
(export, uuid)[source]¶ When the exports APIs throw an error when processing an export, pyTenable will throw this error in turn to relay that context to the user.
-
class
UnexpectedValueError
(msg)[source]¶ An unexpected value error is thrown whenever the value specified for a parameter is outside the bounds of what is expected. For example, if the parameter a is expected to have a value of 1, 2, or 3, and it is instead passed a value of 0, then it is an unexpected value, and this Exception should be thrown by the package.
-
class
UnknownError
(r)[source]¶ If the package is unable to determine what categorization the Exception should fall under, it will fall back to this Exception type. We should generally not see UnknownError be thrown.
-
response
¶ This is the Response object that had caused the Exception to fire.
Type: request.Response
-