Module netapp_ontap.error

Copyright © 2020 NetApp Inc. All rights reserved.

This module defines the custom exception type. All exceptions raised by the library descend from this type.


class NetAppRestError (message: str = None, cause: Exception = None)

Common base class for all exceptions raised by the library functions. All custom exceptions are derived from this type.

Initalize the error object.

Optionally accepts a custom message and cause. If provided, the cause is the exception object that was handled when this exception is created.


A human readable message that explains the error.
An exception object that caused this exception to be raised.


  • builtins.Exception
  • builtins.BaseException

Instance variables


Describes a response to an API request that contains an error.


Response object if the exception was raised because of an API failure (HTTP status code of 400 or higher). None if the exception was not related to an API error.