Skip to content

Exceptions

pyecotrend_ista.exception_classes

Exception Class.

Classes:

Functions:

  • deprecated

    Decorate a function as deprecated and emit a warning when called.

BaseError


              flowchart TD
              pyecotrend_ista.exception_classes.BaseError[BaseError]

              

              click pyecotrend_ista.exception_classes.BaseError href "" "pyecotrend_ista.exception_classes.BaseError"
            

Base class for exceptions in this module.

This is the base class for all custom exceptions in the module. It inherits from Python's built-in Exception class and can be used to catch errors specific to this module.

ServerError


              flowchart TD
              pyecotrend_ista.exception_classes.ServerError[ServerError]
              pyecotrend_ista.exception_classes.BaseError[BaseError]

                              pyecotrend_ista.exception_classes.BaseError --> pyecotrend_ista.exception_classes.ServerError
                


              click pyecotrend_ista.exception_classes.ServerError href "" "pyecotrend_ista.exception_classes.ServerError"
              click pyecotrend_ista.exception_classes.BaseError href "" "pyecotrend_ista.exception_classes.BaseError"
            

Exception raised for server errors during requests.

This exception is raised when a exception occurs during a request. It inherits from BaseError and can be used to handle server-related issues specifically.

Methods:

  • __str__

    Return a string representation of the error..

__str__

__str__() -> str

Return a string representation of the error..

LoginError


              flowchart TD
              pyecotrend_ista.exception_classes.LoginError[LoginError]
              pyecotrend_ista.exception_classes.BaseError[BaseError]

                              pyecotrend_ista.exception_classes.BaseError --> pyecotrend_ista.exception_classes.LoginError
                


              click pyecotrend_ista.exception_classes.LoginError href "" "pyecotrend_ista.exception_classes.LoginError"
              click pyecotrend_ista.exception_classes.BaseError href "" "pyecotrend_ista.exception_classes.BaseError"
            

Exception raised for login- and authentication related errors.

This exception is raised when an authentication exception occurs during a request. It inherits from BaseError and is used specifically to handle issues related to authentication and login.

Methods:

  • __str__

    Return a string representation of an authentication error.

__str__

__str__() -> str

Return a string representation of an authentication error.

ParserError


              flowchart TD
              pyecotrend_ista.exception_classes.ParserError[ParserError]
              pyecotrend_ista.exception_classes.ServerError[ServerError]
              pyecotrend_ista.exception_classes.BaseError[BaseError]

                              pyecotrend_ista.exception_classes.ServerError --> pyecotrend_ista.exception_classes.ParserError
                                pyecotrend_ista.exception_classes.BaseError --> pyecotrend_ista.exception_classes.ServerError
                



              click pyecotrend_ista.exception_classes.ParserError href "" "pyecotrend_ista.exception_classes.ParserError"
              click pyecotrend_ista.exception_classes.ServerError href "" "pyecotrend_ista.exception_classes.ServerError"
              click pyecotrend_ista.exception_classes.BaseError href "" "pyecotrend_ista.exception_classes.BaseError"
            

Exception raised for errors encountered during parsing.

This exception is raised when an error occurs during the parsing process of the request response. It inherits from BaseError and can be used to handle issues specifically related to parsing.

Methods:

  • __str__

    Return a string representation of parser error.

__str__

__str__() -> str

Return a string representation of parser error.

KeycloakError

KeycloakError(error_message='', response_code=None, response_body=None)

              flowchart TD
              pyecotrend_ista.exception_classes.KeycloakError[KeycloakError]

              

              click pyecotrend_ista.exception_classes.KeycloakError href "" "pyecotrend_ista.exception_classes.KeycloakError"
            

Base class for custom Keycloak errors.

Parameters:

  • error_message

    (str, default: '' ) –

    The error message (default is an empty string).

  • response_code

    (int, default: None ) –

    The code of the response (default is None).

  • response_body

    (bytes, default: None ) –

    Body of the response (default is None).

Methods:

__str__

__str__()

Str method.

Returns:

  • str

    String representation of the object.

KeycloakAuthenticationError

KeycloakAuthenticationError(error_message='', response_code=None, response_body=None)

              flowchart TD
              pyecotrend_ista.exception_classes.KeycloakAuthenticationError[KeycloakAuthenticationError]
              pyecotrend_ista.exception_classes.KeycloakError[KeycloakError]

                              pyecotrend_ista.exception_classes.KeycloakError --> pyecotrend_ista.exception_classes.KeycloakAuthenticationError
                


              click pyecotrend_ista.exception_classes.KeycloakAuthenticationError href "" "pyecotrend_ista.exception_classes.KeycloakAuthenticationError"
              click pyecotrend_ista.exception_classes.KeycloakError href "" "pyecotrend_ista.exception_classes.KeycloakError"
            

Keycloak authentication error exception.

Parameters:

  • error_message

    (str, default: '' ) –

    The error message (default is an empty string).

  • response_code

    (int, default: None ) –

    The code of the response (default is None).

  • response_body

    (bytes, default: None ) –

    Body of the response (default is None).

Methods:

__str__

__str__()

Str method.

Returns:

  • str

    String representation of the object.

KeycloakOperationError

KeycloakOperationError(error_message='', response_code=None, response_body=None)

              flowchart TD
              pyecotrend_ista.exception_classes.KeycloakOperationError[KeycloakOperationError]
              pyecotrend_ista.exception_classes.KeycloakError[KeycloakError]

                              pyecotrend_ista.exception_classes.KeycloakError --> pyecotrend_ista.exception_classes.KeycloakOperationError
                


              click pyecotrend_ista.exception_classes.KeycloakOperationError href "" "pyecotrend_ista.exception_classes.KeycloakOperationError"
              click pyecotrend_ista.exception_classes.KeycloakError href "" "pyecotrend_ista.exception_classes.KeycloakError"
            

Keycloak operation error exception.

Parameters:

  • error_message

    (str, default: '' ) –

    The error message (default is an empty string).

  • response_code

    (int, default: None ) –

    The code of the response (default is None).

  • response_body

    (bytes, default: None ) –

    Body of the response (default is None).

Methods:

__str__

__str__()

Str method.

Returns:

  • str

    String representation of the object.

KeycloakGetError

KeycloakGetError(error_message='', response_code=None, response_body=None)

              flowchart TD
              pyecotrend_ista.exception_classes.KeycloakGetError[KeycloakGetError]
              pyecotrend_ista.exception_classes.KeycloakOperationError[KeycloakOperationError]
              pyecotrend_ista.exception_classes.KeycloakError[KeycloakError]

                              pyecotrend_ista.exception_classes.KeycloakOperationError --> pyecotrend_ista.exception_classes.KeycloakGetError
                                pyecotrend_ista.exception_classes.KeycloakError --> pyecotrend_ista.exception_classes.KeycloakOperationError
                



              click pyecotrend_ista.exception_classes.KeycloakGetError href "" "pyecotrend_ista.exception_classes.KeycloakGetError"
              click pyecotrend_ista.exception_classes.KeycloakOperationError href "" "pyecotrend_ista.exception_classes.KeycloakOperationError"
              click pyecotrend_ista.exception_classes.KeycloakError href "" "pyecotrend_ista.exception_classes.KeycloakError"
            

Keycloak request get error exception.

Parameters:

  • error_message

    (str, default: '' ) –

    The error message (default is an empty string).

  • response_code

    (int, default: None ) –

    The code of the response (default is None).

  • response_body

    (bytes, default: None ) –

    Body of the response (default is None).

Methods:

__str__

__str__()

Str method.

Returns:

  • str

    String representation of the object.

KeycloakPostError

KeycloakPostError(error_message='', response_code=None, response_body=None)

              flowchart TD
              pyecotrend_ista.exception_classes.KeycloakPostError[KeycloakPostError]
              pyecotrend_ista.exception_classes.KeycloakOperationError[KeycloakOperationError]
              pyecotrend_ista.exception_classes.KeycloakError[KeycloakError]

                              pyecotrend_ista.exception_classes.KeycloakOperationError --> pyecotrend_ista.exception_classes.KeycloakPostError
                                pyecotrend_ista.exception_classes.KeycloakError --> pyecotrend_ista.exception_classes.KeycloakOperationError
                



              click pyecotrend_ista.exception_classes.KeycloakPostError href "" "pyecotrend_ista.exception_classes.KeycloakPostError"
              click pyecotrend_ista.exception_classes.KeycloakOperationError href "" "pyecotrend_ista.exception_classes.KeycloakOperationError"
              click pyecotrend_ista.exception_classes.KeycloakError href "" "pyecotrend_ista.exception_classes.KeycloakError"
            

Keycloak request post error exception.

Parameters:

  • error_message

    (str, default: '' ) –

    The error message (default is an empty string).

  • response_code

    (int, default: None ) –

    The code of the response (default is None).

  • response_body

    (bytes, default: None ) –

    Body of the response (default is None).

Methods:

__str__

__str__()

Str method.

Returns:

  • str

    String representation of the object.

KeycloakCodeNotFound

KeycloakCodeNotFound(error_message='', response_code=None, response_body=None)

              flowchart TD
              pyecotrend_ista.exception_classes.KeycloakCodeNotFound[KeycloakCodeNotFound]
              pyecotrend_ista.exception_classes.KeycloakOperationError[KeycloakOperationError]
              pyecotrend_ista.exception_classes.KeycloakError[KeycloakError]

                              pyecotrend_ista.exception_classes.KeycloakOperationError --> pyecotrend_ista.exception_classes.KeycloakCodeNotFound
                                pyecotrend_ista.exception_classes.KeycloakError --> pyecotrend_ista.exception_classes.KeycloakOperationError
                



              click pyecotrend_ista.exception_classes.KeycloakCodeNotFound href "" "pyecotrend_ista.exception_classes.KeycloakCodeNotFound"
              click pyecotrend_ista.exception_classes.KeycloakOperationError href "" "pyecotrend_ista.exception_classes.KeycloakOperationError"
              click pyecotrend_ista.exception_classes.KeycloakError href "" "pyecotrend_ista.exception_classes.KeycloakError"
            

Keycloak Code not found exception.

Parameters:

  • error_message

    (str, default: '' ) –

    The error message (default is an empty string).

  • response_code

    (int, default: None ) –

    The code of the response (default is None).

  • response_body

    (bytes, default: None ) –

    Body of the response (default is None).

Methods:

__str__

__str__()

Str method.

Returns:

  • str

    String representation of the object.

KeycloakInvalidTokenError

KeycloakInvalidTokenError(error_message='', response_code=None, response_body=None)

              flowchart TD
              pyecotrend_ista.exception_classes.KeycloakInvalidTokenError[KeycloakInvalidTokenError]
              pyecotrend_ista.exception_classes.KeycloakOperationError[KeycloakOperationError]
              pyecotrend_ista.exception_classes.KeycloakError[KeycloakError]

                              pyecotrend_ista.exception_classes.KeycloakOperationError --> pyecotrend_ista.exception_classes.KeycloakInvalidTokenError
                                pyecotrend_ista.exception_classes.KeycloakError --> pyecotrend_ista.exception_classes.KeycloakOperationError
                



              click pyecotrend_ista.exception_classes.KeycloakInvalidTokenError href "" "pyecotrend_ista.exception_classes.KeycloakInvalidTokenError"
              click pyecotrend_ista.exception_classes.KeycloakOperationError href "" "pyecotrend_ista.exception_classes.KeycloakOperationError"
              click pyecotrend_ista.exception_classes.KeycloakError href "" "pyecotrend_ista.exception_classes.KeycloakError"
            

Keycloak invalid token exception.

Parameters:

  • error_message

    (str, default: '' ) –

    The error message (default is an empty string).

  • response_code

    (int, default: None ) –

    The code of the response (default is None).

  • response_body

    (bytes, default: None ) –

    Body of the response (default is None).

Methods:

__str__

__str__()

Str method.

Returns:

  • str

    String representation of the object.

deprecated

deprecated(func: Callable[..., T], alias_func: str | None = None) -> Callable[..., T]

Decorate a function as deprecated and emit a warning when called.

Parameters:

  • func

    (Callable[..., T]) –

    The function to be marked as deprecated.

  • alias_func

    (str, default: None ) –

    The real function name to show as deprecated, in case the function was called through an alias.

Returns:

  • Callable[..., T]

    A wrapper function that emits a deprecation warning when called.