pdstools.infinity.internal._exceptions

Attributes

Exceptions

PegaException

Common base class for all non-exit exceptions.

MultipleErrors

Common base class for all non-exit exceptions.

APITimeoutError

Common base class for all non-exit exceptions.

APIConnectionError

Common base class for all non-exit exceptions.

InvalidInputs

Request contains invalid inputs

InternalServerError

Internal server error

PegaMLopsError

Custom exception for Pega MLOps errors.

NoMonitoringInfo

No monitoring info available.

ShadowCCExists

Shadow CC already exists.

NoMonitoringExportError

The prediction studio export is not properly configured

InvalidRequest

Invalid request.

IncompatiblePegaVersionError

Common base class for all non-exit exceptions.

Functions

handle_pega_exception(→ Union[PegaException, Exception])

Module Contents

exception PegaException(base_url: str, endpoint: str, params: Dict, response: httpx.Response, override_message: str | None = None)

Bases: Exception

Common base class for all non-exit exceptions.

Parameters:
  • base_url (str)

  • endpoint (str)

  • params (Dict)

  • response (httpx.Response)

  • override_message (Optional[str])

status_code: int
classification: str
localized_value: str
details: List[Dict[str, Any]]
base_url
endpoint
params
response
override_message = None
__str__()

Return str(self).

exception MultipleErrors(details)

Bases: Exception

Common base class for all non-exit exceptions.

details
__str__()

Return str(self).

exception APITimeoutError(request)

Bases: Exception

Common base class for all non-exit exceptions.

request
__str__()

Return str(self).

exception APIConnectionError(request)

Bases: Exception

Common base class for all non-exit exceptions.

request
__str__()

Return str(self).

exception InvalidInputs(base_url: str, endpoint: str, params: Dict, response: httpx.Response, override_message: str | None = None)

Bases: PegaException

Request contains invalid inputs

Parameters:
  • base_url (str)

  • endpoint (str)

  • params (Dict)

  • response (httpx.Response)

  • override_message (Optional[str])

exception InternalServerError(base_url: str, endpoint: str, params: Dict, response: httpx.Response, override_message: str | None = None)

Bases: PegaException

Internal server error

Parameters:
  • base_url (str)

  • endpoint (str)

  • params (Dict)

  • response (httpx.Response)

  • override_message (Optional[str])

exception PegaMLopsError

Bases: Exception

Custom exception for Pega MLOps errors.

exception NoMonitoringInfo(base_url: str, endpoint: str, params: Dict, response: httpx.Response, override_message: str | None = None)

Bases: InvalidInputs

No monitoring info available.

Parameters:
  • base_url (str)

  • endpoint (str)

  • params (Dict)

  • response (httpx.Response)

  • override_message (Optional[str])

__str__()

Return str(self).

exception ShadowCCExists(base_url: str, endpoint: str, params: Dict, response: httpx.Response, override_message: str | None = None)

Bases: PegaException

Shadow CC already exists.

Parameters:
  • base_url (str)

  • endpoint (str)

  • params (Dict)

  • response (httpx.Response)

  • override_message (Optional[str])

__str__()

Return str(self).

exception NoMonitoringExportError(base_url: str, endpoint: str, params: Dict, response: httpx.Response, override_message: str | None = None)

Bases: PegaException

The prediction studio export is not properly configured

Parameters:
  • base_url (str)

  • endpoint (str)

  • params (Dict)

  • response (httpx.Response)

  • override_message (Optional[str])

__str__()

Return str(self).

exception InvalidRequest(base_url: str, endpoint: str, params: Dict, response: httpx.Response, override_message: str | None = None)

Bases: PegaException

Invalid request.

Parameters:
  • base_url (str)

  • endpoint (str)

  • params (Dict)

  • response (httpx.Response)

  • override_message (Optional[str])

__str__()

Return str(self).

exception IncompatiblePegaVersionError(minimum_supported_version: str, functionality_description: str | None = None)

Bases: PegaException

Common base class for all non-exit exceptions.

Parameters:
  • minimum_supported_version (str)

  • functionality_description (Union[str, None])

minimum_supported_version
functionality_description = None
__str__()

Return str(self).

error_map
handle_pega_exception(base_url: httpx.URL | str, endpoint: str, params: Dict, response: httpx.Response) PegaException | Exception
Parameters:
  • base_url (Union[httpx.URL, str])

  • endpoint (str)

  • params (Dict)

  • response (httpx.Response)

Return type:

Union[PegaException, Exception]