Shield / Client / exceptions / InvalidParameterException

InvalidParameterException#

class Shield.Client.exceptions.InvalidParameterException#

Exception that indicates that the parameters passed to the API are invalid. If available, this exception includes details in additional properties.

Example

try:
  ...
except client.exceptions.InvalidParameterException 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',
    'reason': 'FIELD_VALIDATION_FAILED'|'OTHER',
    'fields': [
        {
            'name': 'string',
            'message': 'string'
        },
    ],
    'Error': {
        'Code': 'string',
        'Message': 'string'
    }
}

Structure

  • (dict) –

    Exception that indicates that the parameters passed to the API are invalid. If available, this exception includes details in additional properties.

    • message (string) –

    • reason (string) –

      Additional information about the exception.

    • fields (list) –

      Fields that caused the exception.

      • (dict) –

        Provides information about a particular parameter passed inside a request that resulted in an exception.

        • name (string) –

          The name of the parameter that failed validation.

        • message (string) –

          The message describing why the parameter failed validation.

    • 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.