FMS / Client / exceptions / InvalidOperationException

InvalidOperationException#

class FMS.Client.exceptions.InvalidOperationException#

The operation failed because there was nothing to do or the operation wasn’t possible. For example, you might have submitted an AssociateAdminAccount request for an account ID that was already set as the Firewall Manager administrator. Or you might have tried to access a Region that’s disabled by default, and that you need to enable for the Firewall Manager administrator account and for Organizations before you can access it.

Example

try:
  ...
except client.exceptions.InvalidOperationException as e:
  print(e.response)
response#

The parsed error response. All exceptions have a top level Error key that provides normalized access to common exception atrributes. All other keys are specific to this service or exception class.

Syntax

{
    'Message': 'string',
    'Error': {
        'Code': 'string',
        'Message': 'string'
    }
}

Structure

  • (dict) –

    The operation failed because there was nothing to do or the operation wasn’t possible. For example, you might have submitted an AssociateAdminAccount request for an account ID that was already set as the Firewall Manager administrator. Or you might have tried to access a Region that’s disabled by default, and that you need to enable for the Firewall Manager administrator account and for Organizations before you can access it.

    • Message (string) –

    • Error (dict) – Normalized access to common exception attributes.

      • Code (string) – An identifier specifying the exception type.

      • Message (string) – A descriptive message explaining why the exception occured.